aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ndisc.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 1c015665ce71..76ef4353d518 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1481,18 +1481,14 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
1481 if (!buff) 1481 if (!buff)
1482 goto release; 1482 goto release;
1483 1483
1484 skb_put(buff, sizeof(*msg)); 1484 msg = (struct rd_msg *)skb_put(buff, sizeof(*msg));
1485 msg = (struct rd_msg *)icmp6_hdr(buff); 1485 *msg = (struct rd_msg) {
1486 1486 .icmph = {
1487 memset(&msg->icmph, 0, sizeof(struct icmp6hdr)); 1487 .icmp6_type = NDISC_REDIRECT,
1488 msg->icmph.icmp6_type = NDISC_REDIRECT; 1488 },
1489 1489 .target = *target,
1490 /* 1490 .dest = ipv6_hdr(skb)->daddr,
1491 * copy target and destination addresses 1491 };
1492 */
1493
1494 msg->target = *target;
1495 msg->dest = ipv6_hdr(skb)->daddr;
1496 1492
1497 /* 1493 /*
1498 * include target_address option 1494 * include target_address option