Deleted Added
full compact
mld6.c (160981) mld6.c (165118)
1/* $FreeBSD: head/sys/netinet6/mld6.c 160981 2006-08-04 21:27:40Z brooks $ */
1/* $FreeBSD: head/sys/netinet6/mld6.c 165118 2006-12-12 12:17:58Z bz $ */
2/* $KAME: mld6.c,v 1.27 2001/04/04 05:17:30 itojun Exp $ */
3
4/*-
5 * Copyright (C) 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 281 unchanged lines hidden (view full) ---

291 icmp6stat.icp6s_tooshort++;
292 return;
293 }
294#endif
295
296 /* source address validation */
297 ip6 = mtod(m, struct ip6_hdr *); /* in case mpullup */
298 if (!IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) {
2/* $KAME: mld6.c,v 1.27 2001/04/04 05:17:30 itojun Exp $ */
3
4/*-
5 * Copyright (C) 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 281 unchanged lines hidden (view full) ---

291 icmp6stat.icp6s_tooshort++;
292 return;
293 }
294#endif
295
296 /* source address validation */
297 ip6 = mtod(m, struct ip6_hdr *); /* in case mpullup */
298 if (!IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) {
299 char ip6bufs[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN];
299 log(LOG_ERR,
300 "mld6_input: src %s is not link-local (grp=%s)\n",
300 log(LOG_ERR,
301 "mld6_input: src %s is not link-local (grp=%s)\n",
301 ip6_sprintf(&ip6->ip6_src),
302 ip6_sprintf(&mldh->mld_addr));
302 ip6_sprintf(ip6bufs, &ip6->ip6_src),
303 ip6_sprintf(ip6bufg, &mldh->mld_addr));
303 /*
304 * spec (RFC2710) does not explicitly
305 * specify to discard the packet from a non link-local
306 * source address. But we believe it's expected to do so.
307 * XXX: do we have to allow :: as source?
308 */
309 m_freem(m);
310 return;

--- 339 unchanged lines hidden ---
304 /*
305 * spec (RFC2710) does not explicitly
306 * specify to discard the packet from a non link-local
307 * source address. But we believe it's expected to do so.
308 * XXX: do we have to allow :: as source?
309 */
310 m_freem(m);
311 return;

--- 339 unchanged lines hidden ---