W dniu 21.11.2016 15:20, Martin Pieuchot napisaĆ(a):
On 20/11/16(Sun) 08:27, Piotr Durlej wrote:
Hi,
according to the comment in usr.sbin/ripd/packet.c, ripd(8) fails to
find the interface on which a packet was received when the source
and destination addresses of the interface do not share the same
subnet.
Here is a patch: http://www.durlej.net/tmp/ripd-p2p.diff
It's not clear to me if you tested your diff or not. Anyway, you
should better send it *inline* to tech@ with an explanation of which
problem it solves. Test for regressions are also much appreciated.
Of course, the patch has been tested before being posted.
As for sending the patch inline, because of some git diff decorations,
the patch contains a line over 72 characters long. AFAIK, messages
with such a long lines are frowned upon on OpenBSD mailing lists.
Finally, the problem solved by this patch:
Script started on Wed Nov 23 08:58:36 2016
# ifconfig gre0
gre0: flags=9011<UP,POINTOPOINT,LINK0,MULTICAST> mtu 1476
index 5 priority 0 llprio 3
groups: gre
tunnel: inet 192.168.0.1 -> 192.168.0.2
inet 192.168.1.1 --> 192.168.1.2 netmask 0xffffffff
# ripd -dv
startup
[...]
recv_packet: cannot find a matching interface
^C
[...]
terminating
# tcpdump -s1500 -vnlpi gre0
tcpdump: listening on gre0, link-type LOOP
08:59:37.627530 192.168.1.2.520 > 224.0.0.9.520: [udp sum ok]
RIPv2-resp [items 2]: {172.22.1.0/255.255.255.0}(1)
{192.168.0.0/255.255.255.0}(1) [tos 0xc0] [ttl 1] (id 47684, len 72)
^C
1 packets received by filter
0 packets dropped by kernel
# ^D
Script done on Wed Nov 23 09:00:10 2016