Hello,

I’m facing an issue on dhcp_release and dnsmasq in OpenStack and would 
appreciate any help or pointers to find the root cause.

Summary:
dnsmasq is receiving if_nametoindex("lo”) instead of 1939, the index for 
tap2bb5e1af-d3 that was issued by dhcp_release command.

The DHCP RELEASE packet is sent fine, and dnsmasq receives it. However, the 
release actually never happens because dnsmasq receives it as it was sent by 
loopback interface “lo”, index 1. This is observed in the recvmsg from dnsmasq:
ipi_ifindex=if_nametoindex("lo”), opposed to a working environment (x86), where 
I see ipi_ifindex=230, the right index for the tap interface.

I am manually reproducing OpenStack commands for dhcp_release with:
  * strace -s 1024 ip netns exec qdhcp-6a28b963-4729-441a-ba86-cf8424a0ee1a 
./dhcp_release tap2bb5e1af-d3 10.1.0.7 fa:16:3e:af:1a:c4
  * ip netns exec qdhcp-6a28b963-4729-441a-ba86-cf8424a0ee1a tcpdump -i lo udp 
-nnvvXSs 1514
  * strace -s 1024 ip netns exec qdhcp-6a28b963-4729-441a-ba86-cf8424a0ee1a 
dnsmasq -d --no-hosts  --strict-order --except-interface=lo 
--pid-file=/opt/stack/data/neutron/dhcp/6a28b963-4729-441a-ba86-cf8424a0ee1a/pid
 
--dhcp-hostsfile=/opt/stack/data/neutron/dhcp/6a28b963-4729-441a-ba86-cf8424a0ee1a/host
 
--addn-hosts=/opt/stack/data/neutron/dhcp/6a28b963-4729-441a-ba86-cf8424a0ee1a/addn_hosts
 
--dhcp-optsfile=/opt/stack/data/neutron/dhcp/6a28b963-4729-441a-ba86-cf8424a0ee1a/opts
 
--dhcp-leasefile=/opt/stack/data/neutron/dhcp/6a28b963-4729-441a-ba86-cf8424a0ee1a/leases
 --dhcp-match=set:ipxe,175 --bind-interfaces --interface=tap2bb5e1af-d3 
--dhcp-range=set:tag0,10.1.0.0,static,86400s 
--dhcp-option-force=option:mtu,1450 --dhcp-lease-max=16 --conf-file= 
--domain=openstacklocal


dhcp_release:

ioctl(5, SIOCGIFINDEX, {ifr_name="tap2bb5e1af-d3", }) = 0
write(2, "====> ifa->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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
 548}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_IP, 
cmsg_type=IP_PKTINFO, {ipi_ifindex=if_nametoindex("lo"), 
ipi_spec_dst=inet_addr("10.1.0.2"), ipi_addr=inet_addr("10.1.0.2")}}], 
msg_flags=0}, MSG_PEEK|MSG_TRUNC) = 548


# ip netns exec qdhcp-6a28b963-4729-441a-ba86-cf8424a0ee1a ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
1939: tap2bb5e1af-d3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue 
state UNKNOWN group default qlen 1000
    link/ether fa:16:3e:a5:be:29 brd ff:ff:ff:ff:ff:ff
    inet 10.1.0.2/28 brd 10.1.0.15 scope global tap2bb5e1af-d3
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fea5:be29/64 scope link
       valid_lft forever preferred_lft forever


Additional info:
I’m facing this issue with dhcp_release and dnsmasq in OpenStack (process bound 
to device) running on Ubuntu (ppc64le arch).

Any thoughts on what could be happening ?

Thanks!!


Rafael Folco
OpenStack
IBM Linux Technology Center



_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to