ip_fw_iface.c (278259) | ip_fw_iface.c (298048) |
---|---|
1/*- 2 * Copyright (c) 2014 Yandex LLC. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 Yandex LLC. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_iface.c 278259 2015-02-05 13:49:04Z melifaro $"); | 27__FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_iface.c 298048 2016-04-15 12:24:01Z pfg $"); |
28 29/* 30 * Kernel interface tracking API. 31 * 32 */ 33 34#include "opt_ipfw.h" 35#include "opt_inet.h" --- 430 unchanged lines hidden (view full) --- 466{ 467 ipfw_iface_info *i; 468 struct dump_iface_args *da; 469 struct ipfw_iface *iif; 470 471 da = (struct dump_iface_args *)arg; 472 473 i = (ipfw_iface_info *)ipfw_get_sopt_space(da->sd, sizeof(*i)); | 28 29/* 30 * Kernel interface tracking API. 31 * 32 */ 33 34#include "opt_ipfw.h" 35#include "opt_inet.h" --- 430 unchanged lines hidden (view full) --- 466{ 467 ipfw_iface_info *i; 468 struct dump_iface_args *da; 469 struct ipfw_iface *iif; 470 471 da = (struct dump_iface_args *)arg; 472 473 i = (ipfw_iface_info *)ipfw_get_sopt_space(da->sd, sizeof(*i)); |
474 KASSERT(i != 0, ("previously checked buffer is not enough")); | 474 KASSERT(i != NULL, ("previously checked buffer is not enough")); |
475 476 iif = (struct ipfw_iface *)no; 477 478 strlcpy(i->ifname, iif->ifname, sizeof(i->ifname)); 479 if (iif->resolved) 480 i->flags |= IPFW_IFFLAG_RESOLVED; 481 i->ifindex = iif->ifindex; 482 i->refcnt = iif->no.refcnt; --- 55 unchanged lines hidden --- | 475 476 iif = (struct ipfw_iface *)no; 477 478 strlcpy(i->ifname, iif->ifname, sizeof(i->ifname)); 479 if (iif->resolved) 480 i->flags |= IPFW_IFFLAG_RESOLVED; 481 i->ifindex = iif->ifindex; 482 i->refcnt = iif->no.refcnt; --- 55 unchanged lines hidden --- |