From: Miod Vallat Subject: Re: ppp(4) : Add IPv6 support To: Denis Fondras Cc: tech@openbsd.org Date: Mon, 19 Feb 2024 07:01:15 +0000 > Here is a diff to add IPv6 support to ppp(4). > With this diff, I can send and receive IPv6 packets over a PPP connection. Look good to me, but... > Index: if_ppp.c > @@ -579,13 +583,9 @@ pppsioctl(struct ifnet *ifp, u_long cmd, > break; > > case SIOCSIFADDR: > - if (ifa->ifa_addr->sa_family != AF_INET) > - error = EAFNOSUPPORT; > break; > > case SIOCSIFDSTADDR: > - if (ifa->ifa_addr->sa_family != AF_INET) > - error = EAFNOSUPPORT; > break; > > case SIOCSIFMTU: You probably want to nevertheless check sa_family and only allow AF_INET, and AF_INET6 #ifdef INET6, as done e.g. in netinet/ip_carp.c.