Skip to content

Commit

Permalink
discard MLDv2 packets with hoplimit != 1
Browse files Browse the repository at this point in the history
(draft-vida-mld-v2-08.txt section 6.2 mandates it, although RFC2710 does not
explicitly mention it).
  • Loading branch information
suz committed Jun 6, 2004
1 parent 1b9e15f commit 6f42d04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
@@ -1,7 +1,12 @@
CHANGELOG for KAME kit
$KAME: CHANGELOG,v 1.2615 2004/06/02 06:01:52 suz Exp $
$KAME: CHANGELOG,v 1.2616 2004/06/06 15:09:19 suz Exp $

<200406>
2004-06-06 SUZUKI, Shinsuke <suz@crl.hitachi.co.jp>
* kame/pim6sd/mld6.c: discard MLDv2 packets with hoplimit != 1
(draft-vida-mld-v2-08.txt section 6.2 mandates it, although
RFC2710 does not explicitly mention it).

2004-06-01 JINMEI, Tatuya <jinmei@isl.rdc.toshiba.co.jp>
* kame/sys/netinet6/ip6_input.c (ip6_savecontrol): do not check
the current process or thread in the input path. It is
Expand Down
16 changes: 13 additions & 3 deletions kame/kame/pim6sd/mld6.c
@@ -1,4 +1,4 @@
/* $KAME: mld6.c,v 1.50 2004/04/18 15:03:13 suz Exp $ */
/* $KAME: mld6.c,v 1.51 2004/06/06 15:09:20 suz Exp $ */

/*
* Copyright (C) 1998 WIDE Project.
Expand Down Expand Up @@ -370,7 +370,12 @@ accept_mld6(recvlen)
log_msg(LOG_WARNING, 0,
"received an MLD6 message with illegal hop limit(%d) from %s",
*hlimp, sa6_fmt(src));
/* but accept the packet */
/*
* But accept the packet in case of MLDv1, since RFC2710
* does not mention whether to discard such MLD packets or not.
* Whereas in case of MLDv2, it'll be discarded as is stated in
* draft-vida-mld-v2-08.txt section 6.2.
*/
}
if (ifindex == 0)
{
Expand Down Expand Up @@ -410,8 +415,11 @@ accept_mld6(recvlen)
accept_listener_query(src, dst, group,
ntohs(mldh->mld_maxdelay));
#ifdef MLD6V2_LISTENER_REPORT
if (recvlen >= 28)
if (recvlen >= 28) {
if (*hlimp != 1)
return;
accept_listenerV2_query(src, dst, (char *)(mldh), recvlen);
}
#endif
return;

Expand All @@ -425,6 +433,8 @@ accept_mld6(recvlen)

#ifdef MLD6V2_LISTENER_REPORT
case MLD6V2_LISTENER_REPORT:
if (*hlimp != 1)
return;
accept_listenerV2_report(src,dst,(char *)(mldh),recvlen);
return;
#endif
Expand Down

0 comments on commit 6f42d04

Please sign in to comment.