1/*-
2 * Copyright (C) 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 65 unchanged lines hidden (view full) ---
74 * Modified by Van Jacobson, LBL, January 1993
75 * Modified by Ajit Thyagarajan, PARC, August 1993
76 * Modified by Bill Fenner, PARC, April 1994
77 *
78 * MROUTING Revision: 3.5.1.2 + PIM-SMv2 (pimd) Support
79 */
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 254523 2013-08-19 13:27:32Z andre $");
83
84#include "opt_inet6.h"
85
86#include <sys/param.h>
87#include <sys/callout.h>
88#include <sys/errno.h>
89#include <sys/kernel.h>
90#include <sys/lock.h>
91#include <sys/malloc.h>
92#include <sys/mbuf.h>
93#include <sys/module.h>
94#include <sys/domain.h>
95#include <sys/protosw.h>
96#include <sys/signalvar.h>
97#include <sys/socket.h>
98#include <sys/socketvar.h>
99#include <sys/sockio.h>
100#include <sys/sx.h>
101#include <sys/sysctl.h>
102#include <sys/syslog.h>
103#include <sys/systm.h>
--- 5 unchanged lines hidden (view full) ---
109#include <net/vnet.h>
110
111#include <netinet/in.h>
112#include <netinet/in_var.h>
113#include <netinet/icmp6.h>
114#include <netinet/ip_encap.h>
115
116#include <netinet/ip6.h>
117#include <netinet6/ip6_var.h>
118#include <netinet6/scope6_var.h>
119#include <netinet6/nd6.h>
120#include <netinet6/ip6_mroute.h>
121#include <netinet6/ip6protosw.h>
122#include <netinet6/pim6.h>
123#include <netinet6/pim6_var.h>
124
--- 1514 unchanged lines hidden (view full) ---
1639 linkmtu = IN6_LINKMTU(ifp);
1640 if (mb_copy->m_pkthdr.len <= linkmtu || linkmtu < IPV6_MMTU) {
1641 struct sockaddr_in6 dst6;
1642
1643 bzero(&dst6, sizeof(dst6));
1644 dst6.sin6_len = sizeof(struct sockaddr_in6);
1645 dst6.sin6_family = AF_INET6;
1646 dst6.sin6_addr = ip6->ip6_dst;
1647 /*
1648 * We just call if_output instead of nd6_output here, since
1649 * we need no ND for a multicast forwarded packet...right?
1650 */
1651 m_clrprotoflags(m); /* Avoid confusing lower layers. */
1652 error = (*ifp->if_output)(ifp, mb_copy,
1653 (struct sockaddr *)&dst6, NULL);
1654#ifdef MRT6DEBUG
--- 412 unchanged lines hidden ---
2 * Copyright (C) 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 65 unchanged lines hidden (view full) ---
74 * Modified by Van Jacobson, LBL, January 1993
75 * Modified by Ajit Thyagarajan, PARC, August 1993
76 * Modified by Bill Fenner, PARC, April 1994
77 *
78 * MROUTING Revision: 3.5.1.2 + PIM-SMv2 (pimd) Support
79 */
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 254523 2013-08-19 13:27:32Z andre $");
83
84#include "opt_inet6.h"
85
86#include <sys/param.h>
87#include <sys/callout.h>
88#include <sys/errno.h>
89#include <sys/kernel.h>
90#include <sys/lock.h>
91#include <sys/malloc.h>
92#include <sys/mbuf.h>
93#include <sys/module.h>
94#include <sys/domain.h>
95#include <sys/protosw.h>
96#include <sys/signalvar.h>
97#include <sys/socket.h>
98#include <sys/socketvar.h>
99#include <sys/sockio.h>
100#include <sys/sx.h>
101#include <sys/sysctl.h>
102#include <sys/syslog.h>
103#include <sys/systm.h>
--- 5 unchanged lines hidden (view full) ---
109#include <net/vnet.h>
110
111#include <netinet/in.h>
112#include <netinet/in_var.h>
113#include <netinet/icmp6.h>
114#include <netinet/ip_encap.h>
115
116#include <netinet/ip6.h>
117#include <netinet6/ip6_var.h>
118#include <netinet6/scope6_var.h>
119#include <netinet6/nd6.h>
120#include <netinet6/ip6_mroute.h>
121#include <netinet6/ip6protosw.h>
122#include <netinet6/pim6.h>
123#include <netinet6/pim6_var.h>
124
--- 1514 unchanged lines hidden (view full) ---
1639 linkmtu = IN6_LINKMTU(ifp);
1640 if (mb_copy->m_pkthdr.len <= linkmtu || linkmtu < IPV6_MMTU) {
1641 struct sockaddr_in6 dst6;
1642
1643 bzero(&dst6, sizeof(dst6));
1644 dst6.sin6_len = sizeof(struct sockaddr_in6);
1645 dst6.sin6_family = AF_INET6;
1646 dst6.sin6_addr = ip6->ip6_dst;
1647 /*
1648 * We just call if_output instead of nd6_output here, since
1649 * we need no ND for a multicast forwarded packet...right?
1650 */
1651 m_clrprotoflags(m); /* Avoid confusing lower layers. */
1652 error = (*ifp->if_output)(ifp, mb_copy,
1653 (struct sockaddr *)&dst6, NULL);
1654#ifdef MRT6DEBUG
--- 412 unchanged lines hidden ---