diff options
Diffstat (limited to 'pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch')
| -rw-r--r-- | pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch b/pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch index a0788f1a..e70bcc20 100644 --- a/pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch +++ b/pkg/iproute2/patch/0002-Avoid-pointer-arithmetic-on-void.patch @@ -1,4 +1,4 @@ -From f322d5077bb45dffaa384be4c78e4cf218767bf5 Mon Sep 17 00:00:00 2001 +From a5c387d23c3309296d852e6f7fae8eb6ca99bd47 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Tue, 12 Mar 2019 19:12:31 -0700 Subject: [PATCH] Avoid pointer arithmetic on `void *` @@ -18,10 +18,10 @@ Subject: [PATCH] Avoid pointer arithmetic on `void *` 11 files changed, 20 insertions(+), 19 deletions(-) diff --git a/include/libnetlink.h b/include/libnetlink.h -index 9e4cc101..6925de43 100644 +index ad7e7127..09145d77 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h -@@ -206,7 +206,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type); +@@ -219,7 +219,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type); int rta_nest_end(struct rtattr *rta, struct rtattr *nest); #define RTA_TAIL(rta) \ @@ -30,7 +30,7 @@ index 9e4cc101..6925de43 100644 RTA_ALIGN((rta)->rta_len))) #define parse_rtattr_nested(tb, max, rta) \ -@@ -270,7 +270,7 @@ int rtnl_from_file(FILE *, rtnl_listen_filter_t handler, +@@ -287,7 +287,7 @@ int rtnl_from_file(FILE *, rtnl_listen_filter_t handler, void *jarg); #define NLMSG_TAIL(nmsg) \ @@ -40,10 +40,10 @@ index 9e4cc101..6925de43 100644 #ifndef IFA_RTA #define IFA_RTA(r) \ diff --git a/ip/ipfou.c b/ip/ipfou.c -index 9c697770..539e7ab7 100644 +index 760cfee2..8b9dde00 100644 --- a/ip/ipfou.c +++ b/ip/ipfou.c -@@ -232,7 +232,7 @@ static int print_fou_mapping(struct nlmsghdr *n, void *arg) +@@ -228,7 +228,7 @@ static int print_fou_mapping(struct nlmsghdr *n, void *arg) return -1; ghdr = NLMSG_DATA(n); @@ -53,10 +53,10 @@ index 9c697770..539e7ab7 100644 open_json_object(NULL); if (tb[FOU_ATTR_PORT]) diff --git a/ip/ipila.c b/ip/ipila.c -index 475c35b5..0540d1d9 100644 +index f4387e03..c12aa23f 100644 --- a/ip/ipila.c +++ b/ip/ipila.c -@@ -96,7 +96,7 @@ static int print_ila_mapping(struct nlmsghdr *n, void *arg) +@@ -97,7 +97,7 @@ static int print_ila_mapping(struct nlmsghdr *n, void *arg) return -1; ghdr = NLMSG_DATA(n); @@ -80,10 +80,10 @@ index b63d7d5c..c7c9aceb 100644 open_json_object(NULL); switch (ghdr->cmd) { diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c -index f090390f..edbe0f2f 100644 +index 9d1e566c..76ba20c0 100644 --- a/ip/ipl2tp.c +++ b/ip/ipl2tp.c -@@ -345,7 +345,7 @@ static int get_response(struct nlmsghdr *n, void *arg) +@@ -341,7 +341,7 @@ static int get_response(struct nlmsghdr *n, void *arg) if (len < 0) return -1; @@ -93,10 +93,10 @@ index f090390f..edbe0f2f 100644 if (attrs[L2TP_ATTR_PW_TYPE]) p->pw_type = rta_getattr_u16(attrs[L2TP_ATTR_PW_TYPE]); diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c -index bf48e8b5..eecb7e48 100644 +index fc4c8631..3e65e11f 100644 --- a/ip/ipmacsec.c +++ b/ip/ipmacsec.c -@@ -1001,7 +1001,7 @@ static int process(struct nlmsghdr *n, void *arg) +@@ -1083,7 +1083,7 @@ static int process(struct nlmsghdr *n, void *arg) if (ghdr->cmd != MACSEC_CMD_GET_TXSC) return 0; @@ -106,10 +106,10 @@ index bf48e8b5..eecb7e48 100644 fprintf(stderr, "incomplete dump message\n"); return -1; diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c -index 85700444..bbdd06e7 100644 +index 9847f95b..d37f1269 100644 --- a/ip/ipmptcp.c +++ b/ip/ipmptcp.c -@@ -256,7 +256,7 @@ static int print_mptcp_addr(struct nlmsghdr *n, void *arg) +@@ -286,7 +286,7 @@ static int print_mptcp_addr(struct nlmsghdr *n, void *arg) return -1; ghdr = NLMSG_DATA(n); @@ -118,7 +118,7 @@ index 85700444..bbdd06e7 100644 len, NLA_F_NESTED); addrinfo = tb[MPTCP_PM_ATTR_ADDR]; if (!addrinfo) -@@ -371,7 +371,7 @@ static int print_mptcp_limit(struct nlmsghdr *n, void *arg) +@@ -402,7 +402,7 @@ static int print_mptcp_limit(struct nlmsghdr *n, void *arg) return -1; ghdr = NLMSG_DATA(n); @@ -127,20 +127,20 @@ index 85700444..bbdd06e7 100644 open_json_object(NULL); if (tb[MPTCP_PM_ATTR_RCV_ADD_ADDRS]) { -@@ -460,7 +460,7 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl, +@@ -497,7 +497,7 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl, - printf("[%14s]", event_to_str[ghdr->cmd]); + printf("[%16s]", event_to_str[ghdr->cmd]); - parse_rtattr(tb, MPTCP_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len); + parse_rtattr(tb, MPTCP_ATTR_MAX, (struct rtattr *) ((char *) ghdr + GENL_HDRLEN), len); - printf(" token=%08x", rta_getattr_u32(tb[MPTCP_ATTR_TOKEN])); - + if (tb[MPTCP_ATTR_TOKEN]) + printf(" token=%08x", rta_getattr_u32(tb[MPTCP_ATTR_TOKEN])); diff --git a/ip/ipseg6.c b/ip/ipseg6.c -index 4f541ae4..b9baf38c 100644 +index 305b8961..4103a1c6 100644 --- a/ip/ipseg6.c +++ b/ip/ipseg6.c -@@ -115,7 +115,7 @@ static int process_msg(struct nlmsghdr *n, void *arg) +@@ -112,7 +112,7 @@ static int process_msg(struct nlmsghdr *n, void *arg) ghdr = NLMSG_DATA(n); @@ -150,10 +150,10 @@ index 4f541ae4..b9baf38c 100644 open_json_object(NULL); switch (ghdr->cmd) { diff --git a/ip/tcp_metrics.c b/ip/tcp_metrics.c -index acbd745a..051ddc63 100644 +index 9c8fb072..f451c8f2 100644 --- a/ip/tcp_metrics.c +++ b/ip/tcp_metrics.c -@@ -178,7 +178,7 @@ static int process_msg(struct nlmsghdr *n, void *arg) +@@ -175,7 +175,7 @@ static int process_msg(struct nlmsghdr *n, void *arg) if (ghdr->cmd != TCP_METRICS_CMD_GET) return 0; @@ -163,10 +163,10 @@ index acbd745a..051ddc63 100644 if (attrs[TCP_METRICS_ATTR_ADDR_IPV4]) { diff --git a/lib/libnetlink.c b/lib/libnetlink.c -index 7e977a67..7068750f 100644 +index 01648229..80adabf4 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c -@@ -1365,7 +1365,7 @@ int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) +@@ -1396,7 +1396,7 @@ int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) } memcpy(NLMSG_TAIL(n), data, len); @@ -175,7 +175,7 @@ index 7e977a67..7068750f 100644 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len); return 0; } -@@ -1380,7 +1380,7 @@ struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type) +@@ -1411,7 +1411,7 @@ struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type) int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest) { @@ -184,7 +184,7 @@ index 7e977a67..7068750f 100644 return n->nlmsg_len; } -@@ -1396,9 +1396,9 @@ struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type, +@@ -1427,9 +1427,9 @@ struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type, int addattr_nest_compat_end(struct nlmsghdr *n, struct rtattr *start) { @@ -196,7 +196,7 @@ index 7e977a67..7068750f 100644 addattr_nest_end(n, nest); return n->nlmsg_len; } -@@ -1470,7 +1470,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type) +@@ -1501,7 +1501,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type) int rta_nest_end(struct rtattr *rta, struct rtattr *nest) { @@ -205,7 +205,7 @@ index 7e977a67..7068750f 100644 return rta->rta_len; } -@@ -1519,7 +1519,7 @@ int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, +@@ -1550,7 +1550,7 @@ int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, if (RTA_PAYLOAD(rta) < len) return -1; if (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr)) { @@ -215,10 +215,10 @@ index 7e977a67..7068750f 100644 } memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); diff --git a/lib/utils.c b/lib/utils.c -index 53d31006..0f683f9c 100644 +index 6c1c1a8d..040b935c 100644 --- a/lib/utils.c +++ b/lib/utils.c -@@ -1514,7 +1514,7 @@ int get_rtnl_link_stats_rta(struct rtnl_link_stats64 *stats64, +@@ -1543,7 +1543,7 @@ int get_rtnl_link_stats_rta(struct rtnl_link_stats64 *stats64, len = RTA_PAYLOAD(rta); if (len < size) @@ -228,5 +228,5 @@ index 53d31006..0f683f9c 100644 len = size; -- -2.34.1 +2.44.0 |
