Fix netlink with latest iproute
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl+z6UoSHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L748pEwP/1G4GYer/hC1bbAK4/0d6dppp0jjoV0J 40fNsL5o7qRVV2vg/YomReV8A1lfJ4Vuv1Xt33MC3CxvNFOBJu9kAicH1Azf+H+Q mfEfZ8z2fqBk3ZaAgjH4glBNEdqAJU8GokVqHA+DJwsDhI3hSSsHt7qh/m9Pahnk zq0FBYKtRHlb4tO7WzX0oRkrnNDU7shualOcVzs0WVDfhrYz0OHcHBE7sqg3uaf6 BLTOVXUIzR1jDuf78ywC+ugDWmCiliDBgF7g1LTizl86pGZyV7nCb+ll9X27gEO7 zLMYR/jxwrcuk7Raz9KSQX+yyexfJL51ikmDGnIbQKnYr0BNMcsf+VnspM7ahmu9 KLIgTpXoOoB1VBeuN/jOHm77Q9zwBjGdnnDwaX24qwJyqpOeqfip6fAHsJlvIDqJ Oz0F7hMqUb2iXG+hVQ3YnlEohS/H4006XJ2EXG5bdgJnRH65VU9IOrQtjrpkuMAW AVPXhWK5pU0X5RjnE+UPLvsWtNUok5gEyQMih+fOkTqA11hg8I80GGfy4x9Rz8TO NNEVx62v+cplUePUSDvCxymANBriAGz4Bh3sslSVkKkTqc2D3HK167MsBJJBP3wL 46Lf6OqlDUAv+3C4D5N+LhFk0RVT3soMn8bJlgfOHjTbbgKlU1PBOCOrs63oXbTA Uf7jrM3SMN/n =523y -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-request' into staging Fix netlink with latest iproute # gpg: Signature made Tue 17 Nov 2020 15:16:26 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-5.2-pull-request: linux-user,netlink: add IFLA_BRPORT_MRP_RING_OPEN, IFLA_BRPORT_MRP_IN_OPEN linux-user,netlink: fix message translation with ip command Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4b52475866
|
@ -175,6 +175,8 @@ enum {
|
|||
QEMU_IFLA_BRPORT_NEIGH_SUPPRESS,
|
||||
QEMU_IFLA_BRPORT_ISOLATED,
|
||||
QEMU_IFLA_BRPORT_BACKUP_PORT,
|
||||
QEMU_IFLA_BRPORT_MRP_RING_OPEN,
|
||||
QEMU_IFLA_BRPORT_MRP_IN_OPEN,
|
||||
QEMU___IFLA_BRPORT_MAX
|
||||
};
|
||||
|
||||
|
@ -552,6 +554,8 @@ static abi_long host_to_target_slave_data_bridge_nlattr(struct nlattr *nlattr,
|
|||
case QEMU_IFLA_BRPORT_BCAST_FLOOD:
|
||||
case QEMU_IFLA_BRPORT_NEIGH_SUPPRESS:
|
||||
case QEMU_IFLA_BRPORT_ISOLATED:
|
||||
case QEMU_IFLA_BRPORT_MRP_RING_OPEN:
|
||||
case QEMU_IFLA_BRPORT_MRP_IN_OPEN:
|
||||
break;
|
||||
/* uint16_t */
|
||||
case QEMU_IFLA_BRPORT_PRIORITY:
|
||||
|
@ -1125,7 +1129,14 @@ static abi_long target_to_host_for_each_rtattr(struct rtattr *rtattr,
|
|||
|
||||
static abi_long target_to_host_data_link_rtattr(struct rtattr *rtattr)
|
||||
{
|
||||
uint32_t *u32;
|
||||
|
||||
switch (rtattr->rta_type) {
|
||||
/* uint32_t */
|
||||
case QEMU_IFLA_EXT_MASK:
|
||||
u32 = RTA_DATA(rtattr);
|
||||
*u32 = tswap32(*u32);
|
||||
break;
|
||||
default:
|
||||
qemu_log_mask(LOG_UNIMP, "Unknown target QEMU_IFLA type: %d\n",
|
||||
rtattr->rta_type);
|
||||
|
@ -1160,6 +1171,7 @@ static abi_long target_to_host_data_route_rtattr(struct rtattr *rtattr)
|
|||
break;
|
||||
/* u32 */
|
||||
case QEMU_RTA_PRIORITY:
|
||||
case QEMU_RTA_TABLE:
|
||||
case QEMU_RTA_OIF:
|
||||
u32 = RTA_DATA(rtattr);
|
||||
*u32 = tswap32(*u32);
|
||||
|
@ -1200,11 +1212,10 @@ static abi_long target_to_host_data_route(struct nlmsghdr *nlh)
|
|||
struct rtmsg *rtm;
|
||||
|
||||
switch (nlh->nlmsg_type) {
|
||||
case RTM_GETLINK:
|
||||
break;
|
||||
case RTM_NEWLINK:
|
||||
case RTM_DELLINK:
|
||||
case RTM_SETLINK:
|
||||
case RTM_GETLINK:
|
||||
if (nlh->nlmsg_len >= NLMSG_LENGTH(sizeof(*ifi))) {
|
||||
ifi = NLMSG_DATA(nlh);
|
||||
ifi->ifi_type = tswap16(ifi->ifi_type);
|
||||
|
@ -1225,10 +1236,9 @@ static abi_long target_to_host_data_route(struct nlmsghdr *nlh)
|
|||
NLMSG_LENGTH(sizeof(*ifa)));
|
||||
}
|
||||
break;
|
||||
case RTM_GETROUTE:
|
||||
break;
|
||||
case RTM_NEWROUTE:
|
||||
case RTM_DELROUTE:
|
||||
case RTM_GETROUTE:
|
||||
if (nlh->nlmsg_len >= NLMSG_LENGTH(sizeof(*rtm))) {
|
||||
rtm = NLMSG_DATA(nlh);
|
||||
rtm->rtm_flags = tswap32(rtm->rtm_flags);
|
||||
|
|
Loading…
Reference in a new issue