diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-02-20 00:03:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-02-20 00:03:16 +0000 |
commit | 0c91eda49c62127a36ca61e2b67e5b576cfbfae1 (patch) | |
tree | a9cc3cf53bb1bc98da72032198ff4e0abd86ea1b /sys/net/if_mpw.c | |
parent | 214fed708bee6aa6e7f834f2567cc84a6d98d0fa (diff) |
make ether_output with AF_MPLS use a routes gateway address if available
sending an MPLS frame is weird compared to other address families.
other families figure out and pass the address on the local link
for ether_output to use for resolution, but AF_MPLS basically passes
a dummy sockaddr so ether_output can get the ethernet protocol field
right. ether_output then has to pull the route apart to figure out
which address and family to use for address resolution on the local
net. eg, MPLS tagged routes via ip addresess need to pull the route
apart and get at the AF_INET sockaddr to pass to arpresolve. that
code currently uses the destination address of the route, but if
that destination is not on the local network, we'd end up using it
for arp requests that don't work.
this change uses the rt_gateway sockaddr if RTF_GATEWAY is set.
this solves the problem in my testing and doesn't seem to break
other uses cases ive tried.
reported by adrian close via bugs@
ok deraadt@ claudio@
Diffstat (limited to 'sys/net/if_mpw.c')
0 files changed, 0 insertions, 0 deletions