diff options
Diffstat (limited to 'sys/net/if_ethersubr.c')
| -rw-r--r-- | sys/net/if_ethersubr.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 4e95bdc2796..34e91cedcd5 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.130 2008/11/25 12:07:55 claudio Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.131 2009/01/28 22:18:43 michele Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -263,6 +263,12 @@ ether_output(ifp0, m0, dst, rt0) else senderr(EHOSTUNREACH); } +#ifdef MPLS + if (rt->rt_flags & RTF_MPLS) { + if ((m = mpls_output(m, rt)) == NULL) + senderr(EHOSTUNREACH); + } +#endif if (rt->rt_flags & RTF_GATEWAY) { if (rt->rt_gwroute == 0) goto lookup; @@ -289,7 +295,12 @@ ether_output(ifp0, m0, dst, rt0) if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) && !m->m_pkthdr.pf.routed) mcopy = m_copy(m, 0, (int)M_COPYALL); - etype = htons(ETHERTYPE_IP); +#ifdef MPLS + if (rt0->rt_flags & RTF_MPLS) + etype = htons(ETHERTYPE_MPLS); + else +#endif + etype = htons(ETHERTYPE_IP); break; #endif #ifdef INET6 |
