diff --git a/SOURCES/iproute2-3.10.0-Add-IPv6-support-to-VXLAN.patch b/SOURCES/iproute2-3.10.0-Add-IPv6-support-to-VXLAN.patch new file mode 100644 index 0000000..732f6c8 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-Add-IPv6-support-to-VXLAN.patch @@ -0,0 +1,172 @@ +From 885f6dfe74abec4f29fe48433b5ad9f899f2defd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= +Date: Tue, 25 Feb 2014 16:36:10 +0100 +Subject: [PATCH 2/2] Add IPv6 support to VXLAN +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Šabata +--- + include/utils.h | 1 + + ip/iplink_vxlan.c | 59 +++++++++++++++++++++++++++++++++++++++++++++---------- + lib/utils.c | 8 ++++++++ + 3 files changed, 58 insertions(+), 10 deletions(-) + +diff --git a/include/utils.h b/include/utils.h +index 24ff19f..a3e310e 100644 +--- a/include/utils.h ++++ b/include/utils.h +@@ -151,6 +151,7 @@ int print_timestamp(FILE *fp); + extern int cmdlineno; + extern ssize_t getcmdline(char **line, size_t *len, FILE *in); + extern int makeargs(char *line, char *argv[], int maxargs); ++extern int inet_get_addr(const char *src, __u32 *dst, struct in6_addr *dst6); + + struct iplink_req; + int iplink_parse(int argc, char **argv, struct iplink_req *req, +diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c +index fdae6b1..81b8706 100644 +--- a/ip/iplink_vxlan.c ++++ b/ip/iplink_vxlan.c +@@ -43,6 +43,9 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + __u32 saddr = 0; + __u32 gaddr = 0; + __u32 daddr = 0; ++ struct in6_addr saddr6 = IN6ADDR_ANY_INIT; ++ struct in6_addr gaddr6 = IN6ADDR_ANY_INIT; ++ struct in6_addr daddr6 = IN6ADDR_ANY_INIT; + unsigned link = 0; + __u8 tos = 0; + __u8 ttl = 0; +@@ -68,21 +71,30 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + vni_set = 1; + } else if (!matches(*argv, "group")) { + NEXT_ARG(); +- gaddr = get_addr32(*argv); +- +- if (!IN_MULTICAST(ntohl(gaddr))) ++ if (!inet_get_addr(*argv, &gaddr, &gaddr6)) { ++ fprintf(stderr, "Invalid address \"%s\"\n", *argv); ++ return -1; ++ } ++ if (!IN6_IS_ADDR_MULTICAST(&gaddr6) && !IN_MULTICAST(ntohl(gaddr))) + invarg("invalid group address", *argv); + } else if (!matches(*argv, "remote")) { + NEXT_ARG(); +- daddr = get_addr32(*argv); +- +- if (IN_MULTICAST(ntohl(daddr))) ++ if (!inet_get_addr(*argv, &daddr, &daddr6)) { ++ fprintf(stderr, "Invalid address \"%s\"\n", *argv); ++ return -1; ++ } ++ if (IN6_IS_ADDR_MULTICAST(&daddr6) || IN_MULTICAST(ntohl(daddr))) + invarg("invalid remote address", *argv); + } else if (!matches(*argv, "local")) { + NEXT_ARG(); +- if (strcmp(*argv, "any")) +- saddr = get_addr32(*argv); +- if (IN_MULTICAST(ntohl(saddr))) ++ if (strcmp(*argv, "any")) { ++ if (!inet_get_addr(*argv, &saddr, &saddr6)) { ++ fprintf(stderr, "Invalid address \"%s\"\n", *argv); ++ return -1; ++ } ++ } ++ ++ if (IN_MULTICAST(ntohl(saddr)) || IN6_IS_ADDR_MULTICAST(&saddr6)) + invarg("invalid local address", *argv); + } else if (!matches(*argv, "dev")) { + NEXT_ARG(); +@@ -183,7 +195,9 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + "Use 'dstport 4789' to get the IANA assigned value\n" + "Use 'dstport 0' to get default and quiet this message\n"); + } +- if (gaddr && daddr) { ++ if ((gaddr && daddr) || ++ (memcmp(&gaddr6, &in6addr_any, sizeof(gaddr6)) && ++ memcmp(&daddr6, &in6addr_any, sizeof(daddr6)))) { + fprintf(stderr, "vxlan: both group and remote cannot be specified\n"); + return -1; + } +@@ -192,8 +206,16 @@ 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 (memcmp(&gaddr6, &in6addr_any, sizeof(gaddr6)) != 0) ++ addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &gaddr6, sizeof(struct in6_addr)); ++ else if (memcmp(&daddr6, &in6addr_any, sizeof(daddr6)) != 0) ++ addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &daddr6, sizeof(struct in6_addr)); ++ + if (saddr) + addattr_l(n, 1024, IFLA_VXLAN_LOCAL, &saddr, 4); ++ else if (memcmp(&saddr6, &in6addr_any, sizeof(saddr6)) != 0) ++ addattr_l(n, 1024, IFLA_VXLAN_LOCAL6, &saddr6, sizeof(struct in6_addr)); ++ + if (link) + addattr32(n, 1024, IFLA_VXLAN_LINK, link); + addattr8(n, 1024, IFLA_VXLAN_TTL, ttl); +@@ -248,6 +270,17 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + fprintf(f, "remote %s ", + format_host(AF_INET, 4, &addr, s1, sizeof(s1))); + } ++ } else if (tb[IFLA_VXLAN_GROUP6]) { ++ struct in6_addr addr; ++ memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_GROUP6]), sizeof(struct in6_addr)); ++ if (memcmp(&addr, &in6addr_any, sizeof(addr)) != 0) { ++ if (IN6_IS_ADDR_MULTICAST(&addr)) ++ fprintf(f, "group %s ", ++ format_host(AF_INET6, sizeof(struct in6_addr), &addr, s1, sizeof(s1))); ++ else ++ fprintf(f, "remote %s ", ++ format_host(AF_INET6, sizeof(struct in6_addr), &addr, s1, sizeof(s1))); ++ } + } + + if (tb[IFLA_VXLAN_LOCAL]) { +@@ -255,6 +288,12 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + if (addr) + fprintf(f, "local %s ", + format_host(AF_INET, 4, &addr, s1, sizeof(s1))); ++ } else if (tb[IFLA_VXLAN_LOCAL6]) { ++ struct in6_addr addr; ++ memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_LOCAL6]), sizeof(struct in6_addr)); ++ if (memcmp(&addr, &in6addr_any, sizeof(addr)) != 0) ++ fprintf(f, "local %s ", ++ format_host(AF_INET6, sizeof(struct in6_addr), &addr, s1, sizeof(s1))); + } + + if (tb[IFLA_VXLAN_LINK] && +diff --git a/lib/utils.c b/lib/utils.c +index 55fea18..1e12f85 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -864,3 +864,11 @@ int makeargs(char *line, char *argv[], int maxargs) + + return argc; + } ++ ++int inet_get_addr(const char *src, __u32 *dst, struct in6_addr *dst6) ++{ ++ if (strchr(src, ':')) ++ return inet_pton(AF_INET6, src, dst6); ++ else ++ return inet_pton(AF_INET, src, dst); ++} +-- +1.8.5.3 + +diff --git a/include/linux/if_link.h b/include/linux/if_link.h +index 965dc9f..b352b73 100644 +--- a/include/linux/if_link.h ++++ b/include/linux/if_link.h +@@ -309,6 +309,8 @@ enum { + IFLA_VXLAN_L2MISS, + IFLA_VXLAN_L3MISS, + IFLA_VXLAN_PORT, /* destination port */ ++ IFLA_VXLAN_GROUP6, ++ IFLA_VXLAN_LOCAL6, + __IFLA_VXLAN_MAX + }; + #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) diff --git a/SOURCES/iproute2-3.10.0-Add-VF-link-state-control.patch b/SOURCES/iproute2-3.10.0-Add-VF-link-state-control.patch new file mode 100644 index 0000000..3ee81b4 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-Add-VF-link-state-control.patch @@ -0,0 +1,115 @@ +diff --git a/ip/ipaddress.c b/ip/ipaddress.c +index 2b3707a..013b4cb 100644 +--- a/ip/ipaddress.c ++++ b/ip/ipaddress.c +@@ -229,6 +229,7 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo) + struct ifla_vf_vlan *vf_vlan; + struct ifla_vf_tx_rate *vf_tx_rate; + struct ifla_vf_spoofchk *vf_spoofchk; ++ struct ifla_vf_link_state *vf_linkstate; + struct rtattr *vf[IFLA_VF_MAX+1]; + struct rtattr *tmp; + SPRINT_BUF(b1); +@@ -255,6 +256,20 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo) + else + vf_spoofchk = RTA_DATA(vf[IFLA_VF_SPOOFCHK]); + ++ if (vf_spoofchk) { ++ /* Check if the link state vf info type is supported by ++ * this kernel. ++ */ ++ tmp = (struct rtattr *)((char *)vf[IFLA_VF_SPOOFCHK] + ++ vf[IFLA_VF_SPOOFCHK]->rta_len); ++ ++ if (tmp->rta_type != IFLA_VF_LINK_STATE) ++ vf_linkstate = NULL; ++ else ++ vf_linkstate = RTA_DATA(vf[IFLA_VF_LINK_STATE]); ++ } else ++ vf_linkstate = NULL; ++ + fprintf(fp, "\n vf %d MAC %s", vf_mac->vf, + ll_addr_n2a((unsigned char *)&vf_mac->mac, + ETH_ALEN, 0, b1, sizeof(b1))); +@@ -270,6 +285,14 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo) + else + fprintf(fp, ", spoof checking off"); + } ++ if (vf_linkstate) { ++ if (vf_linkstate->link_state == IFLA_VF_LINK_STATE_AUTO) ++ fprintf(fp, ", link-state auto"); ++ else if (vf_linkstate->link_state == IFLA_VF_LINK_STATE_ENABLE) ++ fprintf(fp, ", link-state enable"); ++ else ++ fprintf(fp, ", link-state disable"); ++ } + } + + static void print_link_stats64(FILE *fp, const struct rtnl_link_stats64 *s) { +diff --git a/ip/iplink.c b/ip/iplink.c +index 15dd84f..f8bcd8c 100644 +--- a/ip/iplink.c ++++ b/ip/iplink.c +@@ -77,6 +77,7 @@ void iplink_usage(void) + fprintf(stderr, " [ rate TXRATE ] ] \n"); + + fprintf(stderr, " [ spoofchk { on | off} ] ] \n"); ++ fprintf(stderr, " [ state { auto | enable | disable} ] ]\n"); + fprintf(stderr, " [ master DEVICE ]\n"); + fprintf(stderr, " [ nomaster ]\n"); + fprintf(stderr, " ip link show [ DEVICE | group GROUP ] [up]\n"); +@@ -260,6 +261,19 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp, + ivs.vf = vf; + addattr_l(&req->n, sizeof(*req), IFLA_VF_SPOOFCHK, &ivs, sizeof(ivs)); + ++ } else if (matches(*argv, "state") == 0) { ++ struct ifla_vf_link_state ivl; ++ NEXT_ARG(); ++ if (matches(*argv, "auto") == 0) ++ ivl.link_state = IFLA_VF_LINK_STATE_AUTO; ++ else if (matches(*argv, "enable") == 0) ++ ivl.link_state = IFLA_VF_LINK_STATE_ENABLE; ++ else if (matches(*argv, "disable") == 0) ++ ivl.link_state = IFLA_VF_LINK_STATE_DISABLE; ++ else ++ invarg("Invalid \"state\" value\n", *argv); ++ ivl.vf = vf; ++ addattr_l(&req->n, sizeof(*req), IFLA_VF_LINK_STATE, &ivl, sizeof(ivl)); + } else { + /* rewind arg */ + PREV_ARG(); +diff --git a/include/linux/if_link.h b/include/linux/if_link.h +index 9a31d6b..20092a7 100644 +--- a/include/linux/if_link.h ++++ b/include/linux/if_link.h +@@ -362,6 +362,18 @@ struct ifla_vf_spoofchk { + __u32 setting; + }; + ++enum { ++ IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ ++ IFLA_VF_LINK_STATE_ENABLE, /* link always up */ ++ IFLA_VF_LINK_STATE_DISABLE, /* link always down */ ++ __IFLA_VF_LINK_STATE_MAX, ++}; ++ ++struct ifla_vf_link_state { ++ __u32 vf; ++ __u32 link_state; ++}; ++ + /* VF ports management section + * + * Nested layout of set/get msg is: +diff --git a/include/linux/if_link.h b/include/linux/if_link.h +index 20092a7..4877906 100644 +--- a/include/linux/if_link.h ++++ b/include/linux/if_link.h +@@ -336,6 +336,7 @@ enum { + IFLA_VF_VLAN, + IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ + IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ ++ IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ + __IFLA_VF_MAX, + }; + diff --git a/SOURCES/iproute2-3.10.0-Add-destination-port-support-for-VXLAN.patch b/SOURCES/iproute2-3.10.0-Add-destination-port-support-for-VXLAN.patch new file mode 100644 index 0000000..9e471a0 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-Add-destination-port-support-for-VXLAN.patch @@ -0,0 +1,121 @@ +From 31996f4f78d5532447ef5144fc19e4c046f174b5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= +Date: Tue, 25 Feb 2014 16:30:45 +0100 +Subject: [PATCH 1/2] Add destination port support for VXLAN +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Šabata +--- + ip/iplink_vxlan.c | 29 +++++++++++++++++++++++------ + man/man8/ip-link.8.in | 15 +++++++++++++-- + 2 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c +index 3450135..fdae6b1 100644 +--- a/ip/iplink_vxlan.c ++++ b/ip/iplink_vxlan.c +@@ -23,7 +23,7 @@ + + static void explain(void) + { +- fprintf(stderr, "Usage: ... vxlan id VNI [ group ADDR ] [ local ADDR ]\n"); ++ fprintf(stderr, "Usage: ... vxlan id VNI [ { group | remote } ADDR ] [ local ADDR ]\n"); + fprintf(stderr, " [ ttl TTL ] [ tos TOS ] [ dev PHYS_DEV ]\n"); + fprintf(stderr, " [ dstport PORT ] [ srcport MIN MAX ]\n"); + fprintf(stderr, " [ [no]learning ] [ [no]proxy ] [ [no]rsc ]\n"); +@@ -42,6 +42,7 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + int vni_set = 0; + __u32 saddr = 0; + __u32 gaddr = 0; ++ __u32 daddr = 0; + unsigned link = 0; + __u8 tos = 0; + __u8 ttl = 0; +@@ -70,7 +71,13 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + gaddr = get_addr32(*argv); + + if (!IN_MULTICAST(ntohl(gaddr))) +- invarg("invald group address", *argv); ++ invarg("invalid group address", *argv); ++ } else if (!matches(*argv, "remote")) { ++ NEXT_ARG(); ++ daddr = get_addr32(*argv); ++ ++ if (IN_MULTICAST(ntohl(daddr))) ++ invarg("invalid remote address", *argv); + } else if (!matches(*argv, "local")) { + NEXT_ARG(); + if (strcmp(*argv, "any")) +@@ -176,10 +183,15 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + "Use 'dstport 4789' to get the IANA assigned value\n" + "Use 'dstport 0' to get default and quiet this message\n"); + } +- ++ if (gaddr && daddr) { ++ fprintf(stderr, "vxlan: both group and remote cannot be specified\n"); ++ return -1; ++ } + addattr32(n, 1024, IFLA_VXLAN_ID, vni); + if (gaddr) + addattr_l(n, 1024, IFLA_VXLAN_GROUP, &gaddr, 4); ++ else if (daddr) ++ addattr_l(n, 1024, IFLA_VXLAN_GROUP, &daddr, 4); + if (saddr) + addattr_l(n, 1024, IFLA_VXLAN_LOCAL, &saddr, 4); + if (link) +@@ -228,9 +240,14 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + + if (tb[IFLA_VXLAN_GROUP]) { + __be32 addr = rta_getattr_u32(tb[IFLA_VXLAN_GROUP]); +- if (addr) +- fprintf(f, "group %s ", +- format_host(AF_INET, 4, &addr, s1, sizeof(s1))); ++ if (addr) { ++ if (IN_MULTICAST(ntohl(addr))) ++ fprintf(f, "group %s ", ++ format_host(AF_INET, 4, &addr, s1, sizeof(s1))); ++ else ++ fprintf(f, "remote %s ", ++ format_host(AF_INET, 4, &addr, s1, sizeof(s1))); ++ } + } + + if (tb[IFLA_VXLAN_LOCAL]) { +diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in +index 9daac71..6a32990 100644 +--- a/man/man8/ip-link.8.in ++++ b/man/man8/ip-link.8.in +@@ -265,8 +265,8 @@ the following additional arguments are supported: + .BI type " vxlan " id " ID + .R " [ " + .BI dev " PHYS_DEV " +-.R " ] [ " +-.BI group " IPADDR " ++.RB " ] [ { " group " | " remote " } " ++.I IPADDR + .R " ] [ " + .BI local " IPADDR " + .R " ] [ " +@@ -299,6 +299,17 @@ Identifier) to use. + .sp + .BI group " IPADDR" + - specifies the multicast IP address to join. ++This parameter cannot be specified with the ++.B remote ++parameter. ++ ++.sp ++.BI remote " IPADDR" ++- specifies the unicast destination IP address to use in outgoing packets ++when the destination link layer address is not known in the VXLAN device ++forwarding database. This parameter cannot be specified with the ++.B group ++parameter. + + .sp + .BI local " IPADDR" +-- +1.8.5.3 + diff --git a/SOURCES/iproute2-3.10.0-bridge-fdb-additional-man-changes.patch b/SOURCES/iproute2-3.10.0-bridge-fdb-additional-man-changes.patch new file mode 100644 index 0000000..9267011 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-bridge-fdb-additional-man-changes.patch @@ -0,0 +1,44 @@ +diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 +index e313400..927a492 100644 +--- a/man/man8/bridge.8 ++++ b/man/man8/bridge.8 +@@ -44,12 +44,12 @@ bridge \- show / manipulate bridge addresses and devices + .IR DEV " ]" + + .ti -8 +-.BR "bridge fdb" " { " add " | " append " | " del " } " ++.BR "bridge fdb" " { " add " | " append " | " del " | " replace " } " + .I LLADDR + .B dev + .IR DEV " { " + .BR local " | " temp " } { " +-.BR self " } { " embedded " } { " router " } [ " ++.BR self " } { " router " } [ " + .B dst + .IR IPADDR " ] [ " + .B vni +@@ -275,10 +275,6 @@ the interface to which this address is associated. + - the address is associated with a software fdb (default) + .sp + +-.B embedded +-- the address is associated with an offloaded fdb +-.sp +- + .B router + - the destination address is associated with a router. + Valid if the referenced device is a VXLAN type device and has +@@ -333,6 +329,13 @@ This command removes an existing fdb entry. + + .PP + The arguments are the same as with ++.BR "bridge fdb add" . ++ ++.SS bridge fdb replace - replace a forwarding database entry ++This command replaces an already present fdb entry. ++ ++.PP ++The arguments are the same as with + .BR "bridge fdb add" , + + .SS bridge fdb show - list forwarding entries. diff --git a/SOURCES/iproute2-3.10.0-rtnl_send.patch b/SOURCES/iproute2-3.10.0-rtnl_send.patch new file mode 100644 index 0000000..ea0ee13 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-rtnl_send.patch @@ -0,0 +1,20 @@ +diff --git a/ip/iplink.c b/ip/iplink.c +index dc98019..15dd84f 100644 +--- a/ip/iplink.c ++++ b/ip/iplink.c +@@ -176,8 +176,13 @@ static int iplink_have_newlink(void) + req.n.nlmsg_type = RTM_NEWLINK; + req.i.ifi_family = AF_UNSPEC; + +- rtnl_send(&rth, &req.n, req.n.nlmsg_len); +- rtnl_listen(&rth, accept_msg, NULL); ++ if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) { ++ perror("Could not check for " ++ "link configuration over netlink support"); ++ have_rtnl_newlink = 0; ++ } else { ++ rtnl_listen(&rth, accept_msg, NULL); ++ } + } + return have_rtnl_newlink; + } diff --git a/SOURCES/iproute2-3.10.0-rtt.patch b/SOURCES/iproute2-3.10.0-rtt.patch new file mode 100644 index 0000000..d6307c0 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-rtt.patch @@ -0,0 +1,33 @@ +diff --git a/lib/utils.c b/lib/utils.c +index dae1b51..55fea18 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -144,8 +144,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) + if (t < 0.0) + return -1; + +- /* extra non-digits */ +- if (!p || p == arg || *p) ++ if (!p || p == arg) + return -1; + + /* over/underflow */ +@@ -154,8 +153,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) + } else { + res = strtoul(arg, &p, 0); + +- /* empty string or trailing non-digits */ +- if (!p || p == arg || *p) ++ if (!p || p == arg) + return -1; + + /* overflow */ +@@ -165,8 +163,6 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw) + t = (double)res; + } + +- if (p == arg) +- return -1; + *raw = 1; + + if (*p) { diff --git a/SOURCES/iproute2-3.10.0-vxlan-add-dstport-option.patch b/SOURCES/iproute2-3.10.0-vxlan-add-dstport-option.patch new file mode 100644 index 0000000..194b271 --- /dev/null +++ b/SOURCES/iproute2-3.10.0-vxlan-add-dstport-option.patch @@ -0,0 +1,87 @@ +diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c +index 1025326..3450135 100644 +--- a/ip/iplink_vxlan.c ++++ b/ip/iplink_vxlan.c +@@ -25,8 +25,8 @@ static void explain(void) + { + fprintf(stderr, "Usage: ... vxlan id VNI [ group ADDR ] [ local ADDR ]\n"); + fprintf(stderr, " [ ttl TTL ] [ tos TOS ] [ dev PHYS_DEV ]\n"); +- fprintf(stderr, " [ port MIN MAX ] [ [no]learning ]\n"); +- fprintf(stderr, " [ [no]proxy ] [ [no]rsc ]\n"); ++ fprintf(stderr, " [ dstport PORT ] [ srcport MIN MAX ]\n"); ++ fprintf(stderr, " [ [no]learning ] [ [no]proxy ] [ [no]rsc ]\n"); + fprintf(stderr, " [ [no]l2miss ] [ [no]l3miss ]\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Where: VNI := 0-16777215\n"); +@@ -53,6 +53,8 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + __u8 noage = 0; + __u32 age = 0; + __u32 maxaddr = 0; ++ __u16 dstport = 0; ++ int dst_port_set = 0; + struct ifla_vxlan_port_range range = { 0, 0 }; + + while (argc > 0) { +@@ -115,7 +117,8 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + maxaddr = 0; + else if (get_u32(&maxaddr, *argv, 0)) + invarg("max addresses", *argv); +- } else if (!matches(*argv, "port")) { ++ } else if (!matches(*argv, "port") || ++ !matches(*argv, "srcport")) { + __u16 minport, maxport; + NEXT_ARG(); + if (get_u16(&minport, *argv, 0)) +@@ -125,6 +128,11 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + invarg("max port", *argv); + range.low = htons(minport); + range.high = htons(maxport); ++ } else if (!matches(*argv, "dstport")){ ++ NEXT_ARG(); ++ if (get_u16(&dstport, *argv, 0)) ++ invarg("dst port", *argv); ++ dst_port_set = 1; + } else if (!matches(*argv, "nolearning")) { + learning = 0; + } else if (!matches(*argv, "learning")) { +@@ -160,6 +168,15 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + fprintf(stderr, "vxlan: missing virtual network identifier\n"); + return -1; + } ++ ++ if (!dst_port_set) { ++ fprintf(stderr, "vxlan: destination port not specified\n" ++ "Will use Linux kernel default (non-standard value)\n"); ++ fprintf(stderr, ++ "Use 'dstport 4789' to get the IANA assigned value\n" ++ "Use 'dstport 0' to get default and quiet this message\n"); ++ } ++ + addattr32(n, 1024, IFLA_VXLAN_ID, vni); + if (gaddr) + addattr_l(n, 1024, IFLA_VXLAN_GROUP, &gaddr, 4); +@@ -184,6 +201,9 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + addattr_l(n, 1024, IFLA_VXLAN_PORT_RANGE, + &range, sizeof(range)); + ++ if (dstport) ++ addattr16(n, 1024, IFLA_VXLAN_PORT, htons(dstport)); ++ + return 0; + } + +@@ -233,9 +253,13 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + if (tb[IFLA_VXLAN_PORT_RANGE]) { + const struct ifla_vxlan_port_range *r + = RTA_DATA(tb[IFLA_VXLAN_PORT_RANGE]); +- fprintf(f, "port %u %u ", ntohs(r->low), ntohs(r->high)); ++ fprintf(f, "srcport %u %u ", ntohs(r->low), ntohs(r->high)); + } + ++ if (tb[IFLA_VXLAN_PORT]) ++ fprintf(f, "dstport %u ", ++ ntohs(rta_getattr_u16(tb[IFLA_VXLAN_PORT]))); ++ + if (tb[IFLA_VXLAN_LEARNING] && + !rta_getattr_u8(tb[IFLA_VXLAN_LEARNING])) + fputs("nolearning ", f); diff --git a/SPECS/iproute.spec b/SPECS/iproute.spec index 0239130..bdb90ad 100644 --- a/SPECS/iproute.spec +++ b/SPECS/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 3.10.0 -Release: 6%{?dist} +Release: 13%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.gz @@ -32,6 +32,19 @@ Patch14: iproute2-3.10.0-ipadress-fix-display-of-IPv6-peer-address.pa Patch15: iproute2-3.10.0-bridge-fdb-replace.patch # rhbz#979326 Patch16: iproute2-3.10.0-document-vlan.patch +# rhbz#1032501 +Patch17: iproute2-3.10.0-rtt.patch +# rhbz#1024697 +Patch18: iproute2-3.10.0-bridge-fdb-additional-man-changes.patch +# rhbz#1040454 +Patch19: iproute2-3.10.0-rtnl_send.patch +# rhbz#1039855 +Patch20: iproute2-3.10.0-vxlan-add-dstport-option.patch +# rhbz#1067437 +Patch21: iproute2-3.10.0-Add-destination-port-support-for-VXLAN.patch +Patch22: iproute2-3.10.0-Add-IPv6-support-to-VXLAN.patch +# rhbz#1061593 +Patch23: iproute2-3.10.0-Add-VF-link-state-control.patch License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: flex @@ -94,6 +107,13 @@ sed -i "s/_VERSION_/%{version}/" man/man8/ss.8 %patch14 -p1 -b .ipadress-fix-display-of-IPv6-peer-address %patch15 -p1 -b .bridge-fdb-replace %patch16 -p1 -b .document-vlan +%patch17 -p1 -b .rtt +%patch18 -p1 -b .fdb-man +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 sed -i 's/^LIBDIR=/LIBDIR?=/' Makefile %build @@ -193,6 +213,28 @@ done %{_includedir}/libnetlink.h %changelog +* Tue Feb 25 2014 Petr Šabata - 3.10.0-13 +- Add VF link state control mechanisms (#1061593) + +* Tue Feb 25 2014 Petr Šabata - 3.10.0-12 +- Add destination port and IPv6 support to VXLAN (#1067437) + +* Wed Jan 29 2014 Petr Šabata - 3.10.0-11 +- Don't hang on rtnl_send() failure (#1040454) +- Add the dstport option to vxlan (#1039855) + +* Fri Jan 24 2014 Daniel Mach - 3.10.0-10 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 3.10.0-9 +- Mass rebuild 2013-12-27 + +* Tue Nov 26 2013 Petr Šabata - 3.10.0-8 +- Document fdb replace and embedded bridge options (#1024697) + +* Fri Nov 22 2013 Petr Šabata - 3.10.0-7 +- Fix the rtt time values (#1032501) + * Fri Nov 08 2013 Petr Šabata - 3.10.0-6 - Fix lnstat -i (#1024426) - Support IPv6 peer addresses (#1017228)