Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net use ETHERTYPE_MPLS only for unicast packets (RFC3032)
details: https://anonhg.NetBSD.org/src/rev/a2a3e6f248a0
branches: trunk
changeset: 766138:a2a3e6f248a0
user: kefren <kefren%NetBSD.org@localhost>
date: Thu Jun 16 19:47:30 2011 +0000
description:
use ETHERTYPE_MPLS only for unicast packets (RFC3032)
diffstat:
sys/net/if_ethersubr.c | 7 ++++---
sys/net/if_mpls.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 7c577f3aeeca -r a2a3e6f248a0 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c Thu Jun 16 19:42:20 2011 +0000
+++ b/sys/net/if_ethersubr.c Thu Jun 16 19:47:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.187 2011/05/24 17:16:43 matt Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.187 2011/05/24 17:16:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $");
#include "opt_inet.h"
#include "opt_atalk.h"
@@ -453,7 +453,8 @@
#ifdef MPLS
if (rt0 != NULL && rt_gettag(rt0) != NULL &&
- rt_gettag(rt0)->sa_family == AF_MPLS) {
+ rt_gettag(rt0)->sa_family == AF_MPLS &&
+ (m->m_flags & (M_MCAST | M_BCAST)) == 0) {
union mpls_shim msh;
msh.s_addr = MPLS_GETSADDR(rt0);
if (msh.shim.label != MPLS_LABEL_IMPLNULL)
diff -r 7c577f3aeeca -r a2a3e6f248a0 sys/net/if_mpls.c
--- a/sys/net/if_mpls.c Thu Jun 16 19:42:20 2011 +0000
+++ b/sys/net/if_mpls.c Thu Jun 16 19:47:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mpls.c,v 1.3 2010/06/27 13:39:11 kefren Exp $ */
+/* $NetBSD: if_mpls.c,v 1.4 2011/06/16 19:47:31 kefren Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.3 2010/06/27 13:39:11 kefren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.4 2011/06/16 19:47:31 kefren Exp $");
#include "opt_inet.h"
#include "opt_mpls.h"
@@ -389,7 +389,8 @@
rt->rt_use++;
msh.s_addr = MPLS_GETSADDR(rt);
- if (msh.shim.label == MPLS_LABEL_IMPLNULL) {
+ if (msh.shim.label == MPLS_LABEL_IMPLNULL ||
+ (m->m_flags & (M_MCAST | M_BCAST))) {
m_adj(m, sizeof(union mpls_shim));
m->m_pkthdr.csum_flags = 0;
}
Home |
Main Index |
Thread Index |
Old Index