From 2018b462d27843df38a84c9a7e0ea8d17cbae0ca Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Mon, 21 Sep 2015 03:03:57 +0000 Subject: [PATCH] Re-add deprecated options as no-op to prevent breakage of backward compatibility. Spotted by: ume --- sbin/ifconfig/ifgif.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sbin/ifconfig/ifgif.c b/sbin/ifconfig/ifgif.c index 72ceb1b6e982..de9696a8c5f8 100644 --- a/sbin/ifconfig/ifgif.c +++ b/sbin/ifconfig/ifgif.c @@ -74,6 +74,8 @@ setgifopts(const char *val, int d, int s, const struct afswtch *afp) { int opts; + if (d == 0) + return; ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GIFGOPTS, &ifr) == -1) { warn("ioctl(GIFGOPTS)"); @@ -92,8 +94,12 @@ setgifopts(const char *val, int d, int s, const struct afswtch *afp) } static struct cmd gif_cmds[] = { + DEF_CMD("accept_rev_ethip_ver", 0, setgifopts), + DEF_CMD("-accept_rev_ethip_ver",0, setgifopts), DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), + DEF_CMD("send_rev_ethip_ver", 0, setgifopts), + DEF_CMD("-send_rev_ethip_ver", 0, setgifopts), }; static struct afswtch af_gif = {