Jason Thorpe <[email protected]> writes:

[snip]

>> wg_get_so_by_af(struct wg_softc *wg, const int af)
>> {
>> 
>> +#if defined(INET) && defined(INET6)
>>      return (af == AF_INET) ? wg->wg_so4 : wg->wg_so6;
>> +#else
>> +#ifdef INET
>> +    return wg->wg_so4;
>> +#endif
>> +#ifdef INET6
>> +    return wg->wg_so6;
>> +#endif
>> +#endif
>> }
>
> Seems ... not great to put #ifdefs like this in something that can be build 
> as a module?
>
> -- thorpej

Ya, I noticed that too when I was looking at this.  It is all over the
place, however, and currently if_wg does not build as a module anyway.
I think a lot more work will need to be done to get it there.  I did not
look to see how any of the other if_xxx drivers deal with the lack of
INET or INET6 when modularized.



-- 
Brad Spencer - [email protected] - KC8VKS - http://anduin.eldar.org

Reply via email to