diff options
author | ae <ae@FreeBSD.org> | 2015-05-15 12:19:45 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-05-15 12:19:45 +0000 |
commit | cbc4e577f0ddbb186c12ec1d965fa320173bd33f (patch) | |
tree | 065ca6dad8a6fbc69f914e5e7561b1414318ff67 /sbin | |
parent | 40d3cfa056957b9f55ee302fe8aac44ff6595924 (diff) | |
download | FreeBSD-src-cbc4e577f0ddbb186c12ec1d965fa320173bd33f.zip FreeBSD-src-cbc4e577f0ddbb186c12ec1d965fa320173bd33f.tar.gz |
Add an ability accept encapsulated packets from different sources by one
gif(4) interface. Add new option "ignore_source" for gif(4) interface.
When it is enabled, gif's encapcheck function requires match only for
packet's destination address.
Differential Revision: https://reviews.freebsd.org/D2004
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 10 | ||||
-rw-r--r-- | sbin/ifconfig/ifgif.c | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index db956e7..56b5c14 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 12, 2015 +.Dd May 15, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2428,6 +2428,14 @@ This is for backward compatibility with .It Cm -accept_rev_ethip_ver Clear a flag .Cm accept_rev_ethip_ver . +.It Cm ignore_source +Set a flag to accept encapsulated packets destined to this host +independently from source address. +This may be useful for hosts, that receive encapsulated packets +from the load balancers. +.It Cm -ignore_source +Clear a flag +.Cm ignore_source . .It Cm send_rev_ethip_ver Set a flag to send EtherIP packets with reversed version field intentionally. diff --git a/sbin/ifconfig/ifgif.c b/sbin/ifconfig/ifgif.c index f91508b..91c433c 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\5SEND_REV_ETHIP_VER" +#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\2IGNORE_SOURCE\5SEND_REV_ETHIP_VER" static void gif_status(int); @@ -95,6 +95,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), }; |