CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2019/02/19 17:03:15
Modified files: sys/net : if_ethersubr.c Log message: 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@