aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ndisc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 7ce266f34cc7..05c69964f356 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -389,11 +389,10 @@ static struct sk_buff *ndisc_alloc_skb(struct net_device *dev,
389 return skb; 389 return skb;
390} 390}
391 391
392static void ip6_nd_hdr(struct sock *sk, 392static void ip6_nd_hdr(struct sk_buff *skb, struct net_device *dev,
393 struct sk_buff *skb, struct net_device *dev,
394 const struct in6_addr *saddr, 393 const struct in6_addr *saddr,
395 const struct in6_addr *daddr, 394 const struct in6_addr *daddr,
396 int proto, int len) 395 int hop_limit, int len)
397{ 396{
398 struct ipv6hdr *hdr; 397 struct ipv6hdr *hdr;
399 398
@@ -407,8 +406,8 @@ static void ip6_nd_hdr(struct sock *sk,
407 ip6_flow_hdr(hdr, 0, 0); 406 ip6_flow_hdr(hdr, 0, 0);
408 407
409 hdr->payload_len = htons(len); 408 hdr->payload_len = htons(len);
410 hdr->nexthdr = proto; 409 hdr->nexthdr = IPPROTO_ICMPV6;
411 hdr->hop_limit = inet6_sk(sk)->hop_limit; 410 hdr->hop_limit = hop_limit;
412 411
413 hdr->saddr = *saddr; 412 hdr->saddr = *saddr;
414 hdr->daddr = *daddr; 413 hdr->daddr = *daddr;
@@ -439,7 +438,7 @@ static struct sk_buff *ndisc_build_skb(struct net_device *dev,
439 if (!skb) 438 if (!skb)
440 return NULL; 439 return NULL;
441 440
442 ip6_nd_hdr(sk, skb, dev, saddr, daddr, IPPROTO_ICMPV6, len); 441 ip6_nd_hdr(skb, dev, saddr, daddr, inet6_sk(sk)->hop_limit, len);
443 442
444 skb->transport_header = skb->tail; 443 skb->transport_header = skb->tail;
445 skb_put(skb, len); 444 skb_put(skb, len);
@@ -1480,8 +1479,8 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
1480 if (!buff) 1479 if (!buff)
1481 goto release; 1480 goto release;
1482 1481
1483 ip6_nd_hdr(sk, buff, dev, &saddr_buf, &ipv6_hdr(skb)->saddr, 1482 ip6_nd_hdr(buff, dev, &saddr_buf, &ipv6_hdr(skb)->saddr,
1484 IPPROTO_ICMPV6, len); 1483 inet6_sk(sk)->hop_limit, len);
1485 1484
1486 skb_set_transport_header(buff, skb_tail_pointer(buff) - buff->data); 1485 skb_set_transport_header(buff, skb_tail_pointer(buff) - buff->data);
1487 skb_put(buff, len); 1486 skb_put(buff, len);