From 3e14fd0411e2719cd31c10dff47b403c30e5e3e6 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Fri, 17 Mar 2017 16:39:14 -0700 Subject: [PATCH 1/3] ip route: Add missing space between nexthop and via for mpls multipath routes MPLS multipath routes are missing a space between 'nexthop' and 'via': $ ip -net ns1 -f mpls ro ls 100 nexthopvia inet 172.16.2.2 dev virt12 nexthopvia inet 172.16.3.2 dev br0 Add it. Signed-off-by: David Ahern --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index a7296dca..7cdf0726 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -655,7 +655,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) size_t len = RTA_PAYLOAD(tb[RTA_VIA]) - 2; struct rtvia *via = RTA_DATA(tb[RTA_VIA]); - fprintf(fp, "via %s %s ", + fprintf(fp, " via %s %s ", family_name(via->rtvia_family), format_host(via->rtvia_family, len, via->rtvia_addr)); } From 97d564b90ccb1e4a3c756d9caae161f55b2b63a2 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 9 Mar 2017 21:05:42 +0100 Subject: [PATCH 2/3] vxlan: use preferred address family when neither group or remote is specified When neither group or remote is specified (or if they are specified with the any address), nothing is sent to the kernel. In this case, the kernel defaults to IPv4. This makes impossible to use IPv6 with unspecified unicast remote ("bridge fdb add" will return EAFNOTSUPPORT). If the user specifies a preferred address family (eg, "ip -6 link add"), then send either IFLA_VXLAN_GROUP or IFLA_VXLAN_GROUP6 to enforce the use of the appropriate family. Signed-off-by: Vincent Bernat --- ip/iplink_vxlan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c index 6d02bb47..fef7d3af 100644 --- a/ip/iplink_vxlan.c +++ b/ip/iplink_vxlan.c @@ -286,10 +286,14 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, addattr_l(n, 1024, IFLA_VXLAN_GROUP, &gaddr, 4); else if (daddr) addattr_l(n, 1024, IFLA_VXLAN_GROUP, &daddr, 4); - if (!IN6_IS_ADDR_UNSPECIFIED(&gaddr6)) + else if (!IN6_IS_ADDR_UNSPECIFIED(&gaddr6)) addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &gaddr6, sizeof(struct in6_addr)); else if (!IN6_IS_ADDR_UNSPECIFIED(&daddr6)) addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &daddr6, sizeof(struct in6_addr)); + else if (preferred_family == AF_INET) + addattr_l(n, 1024, IFLA_VXLAN_GROUP, &daddr, 4); + else if (preferred_family == AF_INET6) + addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &daddr6, sizeof(struct in6_addr)); if (saddr) addattr_l(n, 1024, IFLA_VXLAN_LOCAL, &saddr, 4); From cfca3b356a58d829c2f46e2a0ee86f681ced4518 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 20 Mar 2017 10:16:46 -0700 Subject: [PATCH 3/3] update headers from 4.11-rc3 Signed-off-by: Stephen Hemminger --- include/linux/packet_diag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/packet_diag.h b/include/linux/packet_diag.h index d08c63f3..0c5d5dd6 100644 --- a/include/linux/packet_diag.h +++ b/include/linux/packet_diag.h @@ -64,7 +64,7 @@ struct packet_diag_mclist { __u32 pdmc_count; __u16 pdmc_type; __u16 pdmc_alen; - __u8 pdmc_addr[MAX_ADDR_LEN]; + __u8 pdmc_addr[32]; /* MAX_ADDR_LEN */ }; struct packet_diag_ring {