Deleted Added
full compact
if_ethersubr.c (201122) if_ethersubr.c (201527)
1/*-
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/net/if_ethersubr.c 201122 2009-12-28 10:47:04Z luigi $
30 * $FreeBSD: head/sys/net/if_ethersubr.c 201527 2010-01-04 19:01:22Z luigi $
31 */
32
33#include "opt_atalk.h"
34#include "opt_inet.h"
35#include "opt_inet6.h"
36#include "opt_ipx.h"
37#include "opt_netgraph.h"
38#include "opt_carp.h"

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

464{
465 struct ether_header *eh;
466 struct ether_header save_eh;
467 struct mbuf *m;
468 int i;
469 struct ip_fw_args args;
470 struct m_tag *mtag;
471
31 */
32
33#include "opt_atalk.h"
34#include "opt_inet.h"
35#include "opt_inet6.h"
36#include "opt_ipx.h"
37#include "opt_netgraph.h"
38#include "opt_carp.h"

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

464{
465 struct ether_header *eh;
466 struct ether_header save_eh;
467 struct mbuf *m;
468 int i;
469 struct ip_fw_args args;
470 struct m_tag *mtag;
471
472 mtag = m_tag_find(*m0, PACKET_TAG_DUMMYNET, NULL);
472 /* fetch start point from rule, if any */
473 mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL);
473 if (mtag == NULL) {
474 if (mtag == NULL) {
474 args.slot = 0;
475 args.rule.slot = 0;
475 } else {
476 struct dn_pkt_tag *dn_tag;
477
476 } else {
477 struct dn_pkt_tag *dn_tag;
478
479 /* XXX can we free it after use ? */
478 mtag->m_tag_id = PACKET_TAG_NONE;
479 dn_tag = (struct dn_pkt_tag *)(mtag + 1);
480 mtag->m_tag_id = PACKET_TAG_NONE;
481 dn_tag = (struct dn_pkt_tag *)(mtag + 1);
480 if (dn_tag->slot != 0 && V_fw_one_pass)
482 if (dn_tag->rule.slot != 0 && V_fw_one_pass)
481 /* dummynet packet, already partially processed */
482 return (1);
483 /* dummynet packet, already partially processed */
484 return (1);
483 args.slot = dn_tag->slot; /* matching rule to restart */
484 args.rulenum = dn_tag->rulenum;
485 args.rule_id = dn_tag->rule_id;
486 args.chain_id = dn_tag->chain_id;
485 args.rule = dn_tag->rule;
487 }
488
489 /*
490 * I need some amt of data to be contiguous, and in case others need
491 * the packet (shared==1) also better be in the first mbuf.
492 */
493 m = *m0;
494 i = min( m->m_pkthdr.len, max_protohdr);

--- 855 unchanged lines hidden ---
486 }
487
488 /*
489 * I need some amt of data to be contiguous, and in case others need
490 * the packet (shared==1) also better be in the first mbuf.
491 */
492 m = *m0;
493 i = min( m->m_pkthdr.len, max_protohdr);

--- 855 unchanged lines hidden ---