tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: L2TPv3 interface



On Fri, Jan 20, 2017 at 09:26:52PM +0900, Kengo NAKAHARA wrote:
> On 2017/01/20 0:38, Taylor R Campbell wrote:
> >    Date: Thu, 19 Jan 2017 17:58:17 +0900
> >    From: Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
> > A few little comments:
> > 
> >    diff --git a/sys/net/if.c b/sys/net/if.c
> >    index 2386af3..ba63266 100644
> >    --- a/sys/net/if.c
> >    +++ b/sys/net/if.c
> >    @@ -1599,7 +1613,7 @@ if_clone_lookup(const char *name, int *unitp)
> >            strcpy(ifname, "if_");
> >            /* separate interface name from unit */
> >            for (dp = ifname + 3, cp = name; cp - name < IFNAMSIZ &&
> >    -           *cp && (*cp < '0' || *cp > '9');)
> >    +           *cp && !if_is_unit(cp);)
> >                    *dp++ = *cp++;
> > 
> > This changes the generic syntax interface names, perhaps to allow the
> > `2' in `l2tp', although since this loop skips over the first three
> > octets that doesn't seem to be necessary.  Either way, I don't have a
> > problem with this, but it should be done in a separate change.
> 
> I see. But sorry, I want to postpone the fix to reduce unnecessary
> skip... As a first step, I separate this changes and will commit first.

BTW, a proper fix should be looking backwards from the end of the
string and not forward.

Joerg


Home | Main Index | Thread Index | Old Index