Re: IPv4 route with IPv6 gateway

"Nitsche, Elia" <[email protected]> Wed, 22 Jul 2026 09:34:48 +0000
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
> I think the proper way to solve this is to adjust the ifp_output function
> arguments and not abuse flags or mbuf hdr fields.

Do you mean, adding an ether type argument to all if_output
functions, to determine which types of packets to send?
like: ifp->if_output(ifp, m, dst, rt, ETHERTYPE_IP);
This would create many code changes.
Why not just save it within the route as this information is route
dependent? And rt is already in the if_output arguments:
ifp->if_output(ifp, m, dst, rt);

> Is the caching done in nd6 and arp smart enough to pull the packet out
> correctly? That is something to check.
I did not run into issues, but I also did not test it explicitly. Is there
an 'easy' way to invalidate the nd6/arp cache?

elia


________________________________
From: Claudio Jeker <[email protected]>
Sent: Tuesday, July 21, 2026 20:06
To: Denis Fondras
Cc: Nitsche, Elia; [email protected]
Subject: Re: IPv4 route with IPv6 gateway

On Tue, Jul 21, 2026 at 05:08:31PM +0200, Denis Fondras wrote:
> Le Tue, Jul 21, 2026 at 02:13:50PM +0000, Nitsche, Elia a écrit :
> > Hi,
> >
> > I started implementing this too, but I am using a route flag (currently set by
> >
> > sbin/route). Your approach might be cleaner though.
> >
> >
> > Also my diff, does not set the correct ipv4 address in icmp message send from
> >
> > router nodes without an ivp4 address. I dont see any code for this in your diff
> >
> > either.
> >
> > (currently sends as 0.0.0.0, should be 192.0.0.8; see RFC draft-ietf-intarea-v4-via)
> >
> >
> > elia
> >
>
> Thank you for your diff. Adding a flag is a good idea :)

Not sure about that. The gateway has a sa_family which is enough to know
how to resolve the gateway.
I think the proper way to solve this is to adjust the ifp_output function
arguments and not abuse flags or mbuf hdr fields.

Is the caching done in nd6 and arp smart enough to pull the packet out
correctly? That is something to check. After that the question is what
about other interface types?

--
:wq Claudio