aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-20 07:39:00 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-20 22:29:49 -0500
commitca97a644d752b46e5e08526e36705c3b0dd03f5f (patch)
tree2c36826f1f6e843a5bd5c0d20831290649bbca56 /net/ipv6/ndisc.c
parentb27b28cb445975dc02d2e7d9437d23af76a51571 (diff)
downloadkernel_goldelico_gta04-ca97a644d752b46e5e08526e36705c3b0dd03f5f.zip
kernel_goldelico_gta04-ca97a644d752b46e5e08526e36705c3b0dd03f5f.tar.gz
kernel_goldelico_gta04-ca97a644d752b46e5e08526e36705c3b0dd03f5f.tar.bz2
ipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast Addresses.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 350f860..903191a 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -685,11 +685,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)
* RFC2461 7.1.1:
* DAD has to be destined for solicited node multicast address.
*/
- if (dad &&
- !(daddr->s6_addr32[0] == htonl(0xff020000) &&
- daddr->s6_addr32[1] == htonl(0x00000000) &&
- daddr->s6_addr32[2] == htonl(0x00000001) &&
- daddr->s6_addr [12] == 0xff )) {
+ if (dad && !ipv6_addr_is_solict_mult(daddr)) {
ND_PRINTK(2, warn, "NS: bad DAD packet (wrong destination)\n");
return;
}