diff options
author | hrs <hrs@FreeBSD.org> | 2015-09-10 05:59:39 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-09-10 05:59:39 +0000 |
commit | 099cf5ebd02d27e10491256340ce2b58ec9a48b5 (patch) | |
tree | 3bb9ffa99174c93dc6be72e6362ff111eb2a7ab6 /sbin/ifconfig | |
parent | 73868b5389f1d9a90888a4960c03d2c05dd21e92 (diff) | |
download | FreeBSD-src-099cf5ebd02d27e10491256340ce2b58ec9a48b5.zip FreeBSD-src-099cf5ebd02d27e10491256340ce2b58ec9a48b5.tar.gz |
- Remove GIF_{SEND,ACCEPT}_REVETHIP.
- Simplify EADDRNOTAVAIL and EAFNOSUPPORT conditions.
MFC after: 3 days
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifgif.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sbin/ifconfig/ifgif.c b/sbin/ifconfig/ifgif.c index 91c433c..72ceb1b 100644 --- a/sbin/ifconfig/ifgif.c +++ b/sbin/ifconfig/ifgif.c @@ -51,7 +51,7 @@ static const char rcsid[] = #include "ifconfig.h" -#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\2IGNORE_SOURCE\5SEND_REV_ETHIP_VER" +#define GIFBITS "\020\2IGNORE_SOURCE" static void gif_status(int); @@ -70,8 +70,7 @@ gif_status(int s) } static void -setgifopts(const char *val, - int d, int s, const struct afswtch *afp) +setgifopts(const char *val, int d, int s, const struct afswtch *afp) { int opts; @@ -93,12 +92,8 @@ setgifopts(const char *val, } static struct cmd gif_cmds[] = { - DEF_CMD("accept_rev_ethip_ver", GIF_ACCEPT_REVETHIP, setgifopts), - DEF_CMD("-accept_rev_ethip_ver",-GIF_ACCEPT_REVETHIP, setgifopts), DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), - DEF_CMD("send_rev_ethip_ver", GIF_SEND_REVETHIP, setgifopts), - DEF_CMD("-send_rev_ethip_ver", -GIF_SEND_REVETHIP, setgifopts), }; static struct afswtch af_gif = { @@ -110,11 +105,9 @@ static struct afswtch af_gif = { static __constructor void gif_ctor(void) { -#define N(a) (sizeof(a) / sizeof(a[0])) size_t i; - for (i = 0; i < N(gif_cmds); i++) + for (i = 0; i < nitems(gif_cmds); i++) cmd_register(&gif_cmds[i]); af_register(&af_gif); -#undef N } |