On 2019/11/06 11:37, Christian Weisgerber wrote:
> The removal of mobileip(4) has broken shells/nsh.
>
> The patches below simply remove mobileip support from nsh and update
> the MANUAL, including a paragraph that became obsolete when mobileip(4)
> was added. I don't use nsh at all, but with this it compiles again.
>
> ok?
OK.
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/shells/nsh/Makefile,v
> retrieving revision 1.37
> diff -u -p -r1.37 Makefile
> --- Makefile 12 Jul 2019 20:49:38 -0000 1.37
> +++ Makefile 6 Nov 2019 10:30:59 -0000
> @@ -3,7 +3,7 @@
> COMMENT = network switch style shell
>
> DISTNAME = nsh-1.0.20170819
> -REVISION = 0
> +REVISION = 1
>
> GH_ACCOUNT = yellowman
> GH_PROJECT = nsh
> Index: patches/patch-MANUAL
> ===================================================================
> RCS file: /cvs/ports/shells/nsh/patches/patch-MANUAL,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-MANUAL
> --- patches/patch-MANUAL 10 Jul 2017 20:10:36 -0000 1.1
> +++ patches/patch-MANUAL 6 Nov 2019 10:30:59 -0000
> @@ -20,7 +20,7 @@ Index: MANUAL
>
> Remove any networking config from /etc/ that conflicts with nsh, such
> as /etc/hostname.*, /etc/mygate, and daemons from /etc/rc.conf.local that
> -@@ -145,11 +143,14 @@ their configuration file through NSH.)
> +@@ -145,12 +143,15 @@ their configuration file through NSH.)
>
> Add nsh's start command to the top of /etc/rc.local:
>
> @@ -31,9 +31,53 @@ Index: MANUAL
>
> -nsh -vi /etc/nshrc | tee /var/run/nsh.out
> +/usr/local/bin/nsh -vi /etc/nshrc
> -+
> +
> +In case you miss it during boot, system console output is also logged in the
> +kernel message buffer and can be seen with "dmesg -s".
> -
> ++
> You are done. When NSH starts from /etc/rc.local, it will automatically
> load up
> the network configuration into the kernel. At this point, you are free to
> + view and manipulate the configuration from nsh.
> +@@ -843,7 +844,6 @@ nsh(p)/ip ?
> + ipip Allow IP-in-IP Encapsulation
> + gre Allow Generic Route Encapsulation
> + wccp Allow Web Cache Control Protocol
> +- mobileip Allow Mobile IP Encapsulation
> + etherip Allow Ether-IP Encapsulation
> + ipcomp Allow IP Compression
> + esp Allow Encapsulated Security Payload
> +@@ -901,14 +901,6 @@ nsh(p)/ip wccp
> + Allow GRE-based Web Cache Control Protocol packets to manage caching device.
> + Must be used to enable WCCP on gre interfaces.
> +
> +-[no] ip mobileip
> +-----------------
> +-
> +-nsh(p)/ip mobileip
> +-
> +-Allow GRE-based MobileIP encapsulation. Must be used to enable MobileIP
> +-operation on gre interfaces.
> +-
> + [no] ip etherip
> + ---------------
> +
> +@@ -1456,16 +1448,11 @@ There are several special interfaces.
> +
> + gre
> + ---
> +-The gre interface allows for tunnel construction using the Cisco GRE or
> +-Mobile-IP (RFC 2004) encapsulation protocols. You can use the tunnel
> +-command under interface mode to create a tunnel.
> ++The gre interface allows for tunnel construction using the Cisco GRE
> ++encapsulation protocol. You can use the tunnel command under interface
> ++mode to create a tunnel.
> +
> + nsh(interface-gre0)/tunnel 1.2.3.4 5.5.5.5
> +-
> +-Two link flags exist for gre. Link flag 0, set by default, enables GRE
> mode.
> +-The lack of link flag 0 enables MobileIP mode.
> +-
> +-nsh(interface-gre0)/no link 0
> +
> + enc (IPsec Loopback)
> + ---
> Index: patches/patch-commands_c
> ===================================================================
> RCS file: patches/patch-commands_c
> diff -N patches/patch-commands_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-commands_c 6 Nov 2019 10:30:59 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +
> +Index: commands.c
> +--- commands.c.orig
> ++++ commands.c
> +@@ -253,7 +253,6 @@ Menu iptab[] = {
> + { "ipip", "Allow IP-in-IP Encapsulation", CMPL0 0, 0, 0, 0,
> ipsysctl },
> + { "gre", "Allow Generic Route Encapsulation", CMPL0 0, 0, 0, 0,
> ipsysctl },
> + { "wccp", "Allow Web Cache Control Protocol", CMPL0 0, 0, 0, 0,
> ipsysctl },
> +- { "mobileip", "Allow Mobile IP Encapsulation", CMPL0 0, 0, 0, 0,
> ipsysctl },
> + { "etherip", "Allow Ether-IP Encapsulation", CMPL0 0, 0, 0, 0,
> ipsysctl },
> + { "ipcomp", "Allow IP Compression", CMPL0 0, 0, 0, 0,
> ipsysctl },
> + { "esp", "Allow Encapsulated Security Payload", CMPL0 0, 0, 0,
> 0, ipsysctl },
> Index: patches/patch-sysctl_c
> ===================================================================
> RCS file: patches/patch-sysctl_c
> diff -N patches/patch-sysctl_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sysctl_c 6 Nov 2019 10:30:59 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +
> +Index: sysctl.c
> +--- sysctl.c.orig
> ++++ sysctl.c
> +@@ -100,7 +100,6 @@ struct ipsysctl ipsysctls[] = {
> + { "ipip", { CTL_NET, PF_INET, IPPROTO_IPIP, IPIPCTL_ALLOW,
> MIB_STOP, 0 }, 0, 1 },
> + { "gre", { CTL_NET, PF_INET, IPPROTO_GRE, GRECTL_ALLOW,
> MIB_STOP, 0 }, 0, 1 },
> + { "wccp", { CTL_NET, PF_INET, IPPROTO_GRE, GRECTL_WCCP, MIB_STOP,
> 0 }, 0, 1 },
> +-{ "mobileip", { CTL_NET, PF_INET, IPPROTO_MOBILE,
> MOBILEIPCTL_ALLOW, MIB_STOP, 0 }, 0, 1 },
> + { "etherip", { CTL_NET, PF_INET,
> IPPROTO_ETHERIP,ETHERIPCTL_ALLOW, MIB_STOP, 0 }, 0, 1 },
> + { "ipcomp", { CTL_NET, PF_INET, IPPROTO_IPCOMP, IPCOMPCTL_ENABLE,
> MIB_STOP, 0 }, 0, 1 },
> + { "esp", { CTL_NET, PF_INET, IPPROTO_ESP, ESPCTL_ENABLE,
> MIB_STOP, 0 }, 0, 0 },
> --
> Christian "naddy" Weisgerber [email protected]