Deleted Added
full compact
if_pfsync.c (343236) if_pfsync.c (345439)
1/*-
2 * Copyright (c) 2002 Michael Shalayeff
3 * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

53 * 1.128 - cleanups
54 * 1.146 - bzero() mbuf before sparsely filling it with data
55 * 1.170 - SIOCSIFMTU checks
56 * 1.126, 1.142 - deferred packets processing
57 * 1.173 - correct expire time processing
58 */
59
60#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Michael Shalayeff
3 * Copyright (c) 2012 Gleb Smirnoff <glebius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

53 * 1.128 - cleanups
54 * 1.146 - bzero() mbuf before sparsely filling it with data
55 * 1.170 - SIOCSIFMTU checks
56 * 1.126, 1.142 - deferred packets processing
57 * 1.173 - correct expire time processing
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: stable/11/sys/netpfil/pf/if_pfsync.c 343236 2019-01-21 00:32:03Z kp $");
61__FBSDID("$FreeBSD: stable/11/sys/netpfil/pf/if_pfsync.c 345439 2019-03-23 07:07:41Z kp $");
62
63#include "opt_inet.h"
64#include "opt_inet6.h"
65#include "opt_pf.h"
66
67#include <sys/param.h>
68#include <sys/bus.h>
69#include <sys/endian.h>

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

356 if_attach(ifp);
357
358 bpfattach(ifp, DLT_PFSYNC, PFSYNC_HDRLEN);
359
360 sc->sc_buckets = mallocarray(pfsync_buckets, sizeof(*sc->sc_buckets),
361 M_PFSYNC, M_ZERO | M_WAITOK);
362 for (c = 0; c < pfsync_buckets; c++) {
363 b = &sc->sc_buckets[c];
62
63#include "opt_inet.h"
64#include "opt_inet6.h"
65#include "opt_pf.h"
66
67#include <sys/param.h>
68#include <sys/bus.h>
69#include <sys/endian.h>

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

356 if_attach(ifp);
357
358 bpfattach(ifp, DLT_PFSYNC, PFSYNC_HDRLEN);
359
360 sc->sc_buckets = mallocarray(pfsync_buckets, sizeof(*sc->sc_buckets),
361 M_PFSYNC, M_ZERO | M_WAITOK);
362 for (c = 0; c < pfsync_buckets; c++) {
363 b = &sc->sc_buckets[c];
364 mtx_init(&b->b_mtx, pfsyncname, NULL, MTX_DEF);
364 mtx_init(&b->b_mtx, "pfsync bucket", NULL, MTX_DEF);
365
366 b->b_id = c;
367 b->b_sc = sc;
368 b->b_len = PFSYNC_MINPKT;
369
370 for (q = 0; q < PFSYNC_S_COUNT; q++)
371 TAILQ_INIT(&b->b_qs[q]);
372

--- 2178 unchanged lines hidden ---
365
366 b->b_id = c;
367 b->b_sc = sc;
368 b->b_len = PFSYNC_MINPKT;
369
370 for (q = 0; q < PFSYNC_S_COUNT; q++)
371 TAILQ_INIT(&b->b_qs[q]);
372

--- 2178 unchanged lines hidden ---