On Sat, Jun 10, 2017 at 10:22:22AM +0200, Stefan Sperling wrote:
> On Sat, Jun 10, 2017 at 08:35:13AM +0100, Jason McIntyre wrote:
> > thanks. the ifconfig.8 bits look good, but i think you should also
> > change the examples given in pppoe(4) to show the updated syntax, to
> > prepare folks.
> > 
> > actually i think it would be better to discuss the deprecated stuff
> > in pppoe(4), rather than adding it to ifconfig(8).
> 
> Sure. I think it is also worth pointing out that all this is IPv4 only.
> Also document sppp(4) behaviour with respect to the default route.
> 

thanks, i'm fine with this.
jmc

> Index: sbin/ifconfig/ifconfig.8
> ===================================================================
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.282
> diff -u -p -r1.282 ifconfig.8
> --- sbin/ifconfig/ifconfig.8  12 May 2017 15:11:02 -0000      1.282
> +++ sbin/ifconfig/ifconfig.8  10 Jun 2017 08:17:32 -0000
> @@ -1393,6 +1393,8 @@ Clear a previously set service name.
>  .Op Cm authkey Ar key
>  .Op Cm authname Ar name
>  .Op Cm authproto Ar proto
> +.Op Oo Fl Oc Ns Cm dynaddr
> +.Op Oo Fl Oc Ns Cm dyndest
>  .Op Oo Fl Oc Ns Cm peerflag Ar flag
>  .Op Cm peerkey Ar key
>  .Op Cm peername Ar name
> @@ -1419,6 +1421,19 @@ The protocol name can be either
>  or
>  .Ql none .
>  In the latter case, authentication will be turned off.
> +.It Cm dynaddr
> +The local IPv4 address will be changed to an address suggested by the peer.
> +.It Cm -dynaddr
> +Disable dynamic updates of the local IPv4 address.
> +This is the default.
> +.It Cm dyndest
> +The destination IPv4 address will be changed to an address suggested
> +by the peer.
> +If a default route which uses this interface exists, the gateway will be
> +changed to the suggested address as well.
> +.It Cm -dyndest
> +Disable dynamic updates of the destination IPv4 address.
> +This is the default.
>  .It Cm peerflag Ar flag
>  Set a specified PPP flag for the remote authenticator.
>  The flag name can be either
> Index: share/man/man4/pppoe.4
> ===================================================================
> RCS file: /cvs/src/share/man/man4/pppoe.4,v
> retrieving revision 1.33
> diff -u -p -r1.33 pppoe.4
> --- share/man/man4/pppoe.4    22 Mar 2017 21:37:24 -0000      1.33
> +++ share/man/man4/pppoe.4    10 Jun 2017 08:11:35 -0000
> @@ -99,9 +99,10 @@ A typical file looks like this:
>  inet 0.0.0.0 255.255.255.255 NONE \e
>       pppoedev em0 authproto pap \e
>       authname 'testcaller' authkey 'donttell' up
> -dest 0.0.0.1
> +dest 10.1.1.1
> +dynaddr dyndest
>  inet6 eui64
> -!/sbin/route add default -ifp pppoe0 0.0.0.1
> +!/sbin/route add default -ifp pppoe0 10.1.1.1
>  !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
>  .Ed
>  .Pp
> @@ -111,19 +112,28 @@ The physical interface must also be mark
>  # echo "up" > /etc/hostname.em0
>  .Ed
>  .Pp
> +In the above example, 10.1.1.1 is an otherwise unused IP address which
> +serves as a placeholder for dynamic address configuration.
>  Since this is a PPP interface, the addresses assigned to the interface
>  may change during PPP negotiation.
>  There is no fine grained control available for deciding
>  which addresses are acceptable and which are not.
> -For the local side and the remote address there is exactly one choice:
> -hard coded address or wildcard.
> -If a real address is assigned to one side of the connection,
> -PPP negotiation will only agree to exactly this address.
> -If one side is wildcarded,
> -every address suggested by the peer will be accepted.
> +For the local address and the remote address each there is exactly one 
> choice:
> +hard coded address or dynamic address.
>  .Pp
> +By default, PPP negotiation will only agree to exactly the IPv4 addresses
> +which are configured on the interface.
> +If dynamic address configuration is enabled for the local address (dynaddr)
> +and/or remote address (dyndest), any address suggested by the peer will
> +be accepted and overrides the addresses configured on the interface and
> +the corresponding default route.
> +.Pp
> +A deprecated way of enabling dynamic addresses is by using wildcard 
> addresses.
>  To wildcard the local address set it to 0.0.0.0; to wildcard the remote
> -address set it to 0.0.0.1.
> +address set it to 0.0.0.1 (multiple
> +.Nm
> +interfaces configured with this wildcard destination address cannot share
> +a routing table).
>  .Sh KERNEL OPTIONS
>  .Nm
>  does not interfere with other PPPoE implementations

Reply via email to