shotgun and multiple source ip addresses for send_raw and send_udp

Bug #592177 reported by Miika Komu on 2010-06-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I am not convinced that multiple source addresses works with shotgun.


Please try the suggestion from Kuptsov in output.c:

#if 0
        /* Kuptsov: multiple source addresses might not work properly without
           the trick below. Note that you should find out the ifname with
           getifaddr/if_nameindex. */
        HIP_IFEL(setsockopt(hip_raw_sock_output, SOL_SOCKET, SO_BINDTODEVICE,
                            ifname, strlen(ifname)+1), -1, "Cannot set

At least I have experienced that shotgun sends packets from the same source
address. The problem/solution is independent of I1 or UPDATE.

Kuptsov: I have found the solution for the problem I have discussed earlier.
whenever a multihomed machine wishes to received packets from all IP (or
interfaces) the following should be enabled:

echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

otherwise the packets accepted from one interface which matches the
default route all other packets are dropped. I have added

system("echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter");

in firewall/firewall_init_rules()

and now everything works (this is important for the raw sockets to pick
all packets)

Miika Komu (miika-iki) on 2010-09-22
Changed in hipl:
assignee: nobody → Baris Boyvat (baris-boyvat)
René Hummen (rene-hummen) wrote :

Is this still a valid bug? I couldn't find "rp_filter" anywhere in the sources, so I guess it is outdated!?

Miika Komu (miika-iki) wrote :

This bug is still valid. The source address selection is still buggy in the shotgun extension. That's why one needs to set the rp_filter option in proc to make it work.

Miika Komu (miika-iki) wrote :

Strangely, I can't repeat this problem anymore. However, the shotgun extension has been partially disabled from hipconf which I will fix soon.

Miika Komu (miika-iki) wrote :

I've tested the shotgun extension with success with two pairs of address on both ends with the following configurations:

* IPv4 addresses
* IPv4 addresses + UDP encap
* IPv6 addresses
* Both base exchange and UPDATE

Test platform: Ubuntu Lucid.

Changed in hipl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers