From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6•org>
To: Stephan Gatzka <stephan.gatzka@gmail•com>
Cc: netdev@vger•kernel.org, YOSHIFUJI Hideaki <yoshfuji@linux-ipv6•org>
Subject: Re: [Patch RFC] ndisc: Fix skb allocation size for link layer options.
Date: Sun, 30 Dec 2012 00:29:14 +0900 [thread overview]
Message-ID: <50DF0C4A.5020401@linux-ipv6.org> (raw)
In-Reply-To: <1356702410-32293-1-git-send-email-stephan.gatzka@gmail.com>
Stephan Gatzka wrote:
> Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail•com>
> ---
> net/ipv6/ndisc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 6574175..b12b94c 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -392,7 +392,7 @@ static struct sk_buff *ndisc_build_skb(struct net_device *dev,
>
> len = sizeof(struct icmp6hdr) + (target ? sizeof(*target) : 0);
> if (llinfo)
> - len += ndisc_opt_addr_space(dev);
> + len += sizeof(struct nd_opt_hdr) + ndisc_opt_addr_space(dev);
>
> skb = sock_alloc_send_skb(sk,
> (MAX_HEADER + sizeof(struct ipv6hdr) +
> @@ -1424,7 +1424,8 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
> memcpy(ha_buf, neigh->ha, dev->addr_len);
> read_unlock_bh(&neigh->lock);
> ha = ha_buf;
> - len += ndisc_opt_addr_space(dev);
> + len += sizeof(struct nd_opt_hdr) +
> + ndisc_opt_addr_space(dev);
> } else
> read_unlock_bh(&neigh->lock);
>
>
Disagree. NDISC_OPT_SPACE() takes care size of nd option header.
--yoshfuji
next prev parent reply other threads:[~2012-12-29 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 13:46 [Patch RFC] ndisc: Fix skb allocation size for link layer options Stephan Gatzka
2012-12-29 15:29 ` YOSHIFUJI Hideaki [this message]
2012-12-29 15:32 ` YOSHIFUJI Hideaki
2012-12-29 16:37 ` Stephan Gatzka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50DF0C4A.5020401@linux-ipv6.org \
--to=yoshfuji@linux-ipv6$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephan.gatzka@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox