On Sat, Oct 22, 2011 at 03:24:42PM +0200, Steffen Daode Nurpmeso wrote:
> Ciao,
> 
> 49.html states:
> 
>     dhclient(8) now accepts 'egress' as an interface name, meaning
>     whichever interface is marked as being in the 'egress' group.
> 
> but the manual page doesn't mention it.

i'm not a fan of your diff. i don;t think we should attempt to document
every utility which can use egress - i think we should just expect it to
work in places where it makes sense.

if you want to put a diff together that documents egress for all
utilities which understand egress, i will look at it. but i'm pretty
sure we won;t want that.

having said that, i don;t know much about where egress does and doesn;t
work. so some other developers might disagree and look at your (man)
patch.

jmc

> Also it seems to me that dhclient.c:get_ifname() uses an error()
> call with a %m format without any errno around.   (Nice & fat %m.)
> 
> (Since the data was filled in from the kernel, it even seems to be
> sufficient to replace the entire conditional with
> 
>     (void)strlcpy(ifi->name, arg, IFNAMSIZ);)
> 
> Btw., ifconfig(8) doesn't state at all that there is a limit
> imposed on the length of groupnames.
> And ifconfig.c even restricts availability of groups to
> 
>     #ifndef SMALL 
> 
> but neither does ifconfig.8 state that nor does dhclient.c do any
> such check; it surely will get ENOSYS or something in the end
> though..
> 
> --steffen
> 
> diff --git a/sbin/dhclient/dhclient.8 b/sbin/dhclient/dhclient.8
> index 9d77c7e..3694ff1 100644
> --- a/sbin/dhclient/dhclient.8
> +++ b/sbin/dhclient/dhclient.8
> @@ -57,6 +57,14 @@ The name of the network interface that
>  .Nm
>  should attempt to
>  configure must be specified on the command line.
> +The special name
> +.Ar egress
> +will be automatically expanded to the interface which is assigned to the
> +.Em egress
> +group.
> +See
> +.Xr ifconfig 8
> +for more about groups.
>  .Pp
>  The options are as follows:
>  .Bl -tag -width "-p port"
> @@ -169,7 +177,8 @@ database of acquired leases
>  .Xr dhclient-script 8 ,
>  .Xr dhcp 8 ,
>  .Xr dhcpd 8 ,
> -.Xr dhcrelay 8
> +.Xr dhcrelay 8 ,
> +.Xr ifconfig 8
>  .Sh AUTHORS
>  .An -nosplit
>  .Nm
> diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
> index 8d35021..1c6ac40 100644
> --- a/sbin/dhclient/dhclient.c
> +++ b/sbin/dhclient/dhclient.c
> @@ -2104,7 +2104,7 @@ get_ifname(char *ifname, char *arg)
>               }
>  
>               if (strlcpy(ifi->name, arg, IFNAMSIZ) >= IFNAMSIZ)
> -                     error("Interface name too long: %m");
> +                     error("Interface name too long");
>  
>               free(ifgr.ifgr_groups);
>               close(s);

Reply via email to