ipfilter userland: Remove trailing whitespace
MFC after: 1 month
This commit is contained in:
parent
00a5b8c3d9
commit
27fc223414
@ -6,7 +6,7 @@
|
||||
*
|
||||
* This code is derived from the Stanford/CMU enet packet filter,
|
||||
* (net/enet.c) distributed as part of 4.3BSD, and code contributed
|
||||
* to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
|
||||
* to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
|
||||
* Berkeley Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -55,8 +55,8 @@ typedef int bpf_int32;
|
||||
typedef u_int bpf_u_int32;
|
||||
|
||||
/*
|
||||
* Alignment macros. BPF_WORDALIGN rounds up to the next
|
||||
* even multiple of BPF_ALIGNMENT.
|
||||
* Alignment macros. BPF_WORDALIGN rounds up to the next
|
||||
* even multiple of BPF_ALIGNMENT.
|
||||
*/
|
||||
#ifndef __NetBSD__
|
||||
#define BPF_ALIGNMENT sizeof(bpf_int32)
|
||||
@ -76,7 +76,7 @@ struct bpf_program {
|
||||
u_int bf_len;
|
||||
struct bpf_insn *bf_insns;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Struct returned by BIOCGSTATS.
|
||||
*/
|
||||
@ -86,7 +86,7 @@ struct bpf_stat {
|
||||
};
|
||||
|
||||
/*
|
||||
* Struct return by BIOCVERSION. This represents the version number of
|
||||
* Struct return by BIOCVERSION. This represents the version number of
|
||||
* the filter language described by the instruction encodings below.
|
||||
* bpf understands a program iff kernel_major == filter_major &&
|
||||
* kernel_minor >= filter_minor, that is, if the value returned by the
|
||||
|
@ -15,7 +15,7 @@
|
||||
#endif
|
||||
#include "ipf.h"
|
||||
#include "netinet/ipl.h"
|
||||
#if defined(STATETOP)
|
||||
#if defined(STATETOP)
|
||||
# if defined(sun) && defined(__SVR4)
|
||||
# include <sys/select.h>
|
||||
# endif
|
||||
|
@ -267,7 +267,7 @@ get_unit(name, family)
|
||||
} else {
|
||||
old_ifneta = ifneta;
|
||||
nifs++;
|
||||
ifneta = (struct ifnet **)reallocarray(ifneta, nifs + 1,
|
||||
ifneta = (struct ifnet **)reallocarray(ifneta, nifs + 1,
|
||||
sizeof(ifp));
|
||||
if (!ifneta) {
|
||||
free(old_ifneta);
|
||||
|
@ -819,7 +819,7 @@ to: IPNY_TO { yyexpectaddr = 1; }
|
||||
;
|
||||
|
||||
ifnames:
|
||||
ifname family { yyexpectaddr = 1; }
|
||||
ifname family { yyexpectaddr = 1; }
|
||||
| ifname ',' otherifname family { yyexpectaddr = 1; }
|
||||
;
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ setnodeaddr(int type, int role, void *ptr, char *arg)
|
||||
node->ipn_addr.adf_len = offsetof(addrfamily_t,
|
||||
adf_addr) +
|
||||
sizeof(struct in6_addr);
|
||||
inet_pton(AF_INET6, arg,
|
||||
inet_pton(AF_INET6, arg,
|
||||
&node->ipn_addr.adf_addr.in6.s6_addr);
|
||||
}
|
||||
#endif
|
||||
@ -1099,12 +1099,12 @@ setnodeaddr(int type, int role, void *ptr, char *arg)
|
||||
node->ipe_mask.in4.s_addr = mask.s_addr;
|
||||
#ifdef USE_INET6
|
||||
} else {
|
||||
inet_pton(AF_INET6, arg,
|
||||
inet_pton(AF_INET6, arg,
|
||||
&node->ipe_addr.in6.__u6_addr.__u6_addr32);
|
||||
node->ipe_mask.in6.__u6_addr.__u6_addr32[0] =
|
||||
mask.s_addr;
|
||||
node->ipe_mask.in6.__u6_addr.__u6_addr32[1] =
|
||||
node->ipe_mask.in6.__u6_addr.__u6_addr32[2] =
|
||||
node->ipe_mask.in6.__u6_addr.__u6_addr32[2] =
|
||||
node->ipe_mask.in6.__u6_addr.__u6_addr32[3] = 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -376,7 +376,7 @@ addrmask:
|
||||
sizeof($$[1].adf_addr.in6));
|
||||
else
|
||||
#endif
|
||||
memset(&$$[1].adf_addr, 0xff,
|
||||
memset(&$$[1].adf_addr, 0xff,
|
||||
sizeof($$[1].adf_addr.in4));
|
||||
}
|
||||
;
|
||||
|
@ -28,7 +28,7 @@ void ipf_dotuning(int fd, char *tuneargs, ioctlfunc_t iocfn)
|
||||
if (!strcmp(s, "list")) {
|
||||
while (1) {
|
||||
if ((*iocfn)(fd, SIOCIPFGETNEXT, &obj) == -1) {
|
||||
ipf_perror_fd(fd, iocfn,
|
||||
ipf_perror_fd(fd, iocfn,
|
||||
"ioctl(SIOCIPFGETNEXT)");
|
||||
break;
|
||||
}
|
||||
@ -44,7 +44,7 @@ void ipf_dotuning(int fd, char *tuneargs, ioctlfunc_t iocfn)
|
||||
strncpy(tu.ipft_name, s, sizeof(tu.ipft_name));
|
||||
if (sscanf(t, "%lu", &tu.ipft_vlong) == 1) {
|
||||
if ((*iocfn)(fd, SIOCIPFSET, &obj) == -1) {
|
||||
ipf_perror_fd(fd, iocfn,
|
||||
ipf_perror_fd(fd, iocfn,
|
||||
"ioctl(SIOCIPFSET)");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user