Re: Support for "raw-ip" mode
Yegor Yefremov
Tue Aug 20 13:49:12 2019
On Tue, Aug 20, 2019 at 3:43 PM Roy Marples <roy@xxxxxxxxxxxx> wrote:
>
> On 20/08/2019 14:29, Yegor Yefremov wrote:
> > Even with same card I get different leases. If I understand the whole
> > QMI stuff correctly then the card itself has a DHCP server inside the
> > firmware. And all we need to do is to setup IP configuration for wwan0
> > interface. Hence it doesn't matter whether we get the same of a
> > different IP as we always have only one client.
>
> OK. dhcpcd cannot know this, so lets strive to be RFC compliant.
> We'll use the DUID and interface index, as the client id.
>
> >
> >>> I'm trying to understand what was made in this patch that adds raw-ip
> >>> support to the ISC DHCP [1]. Seems like there is no way to avoid
> >>> packet header manipulation.
> >>>
> >>> [1] https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html
> >>
> >> The attached patch may help dhcpcd get further.
> >
> > With the patch applied:
> >
> > # dhcpcd wwan0
> > dhcpcd-8.0.2 starting
> > [ 150.103174] 8021q: 802.1Q VLAN Support v1.8
> > [ 150.107618] 8021q: adding VLAN 0 to HW filter on device eth0
> > [ 150.113994] 8021q: adding VLAN 0 to HW filter on device eth1
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
> > wwan0: waiting for carrier
> > wwan0: carrier acquired
> > wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
> > DUID 00:01:00:01:c7:92:bc:92:74:6a:8f:ff:50:55
> > wwan0: IAID 00:00:00:06
> > wwan0: delaying IPv6 router solicitation for 0.6 seconds
> > wwan0: delaying IPv4 for 0.9 seconds
> > wwan0: soliciting an IPv6 router
> > wwan0: delaying Router Solicitation for LL address
> > wwan0: soliciting a DHCP lease
> > wwan0: sending DISCOVER (xid 0x53b45005), next in 4.6 seconds
> > dhcp_openbpf: wwan0: Invalid argument
> > wwan0: sending DISCOVER (xid 0x53b45005), next in 8.8 seconds
> > dhcp_openbpf: wwan0: Invalid argument
> > wwan0: sending DISCOVER (xid 0x53b45005), next in 16.2 seconds
> > dhcp_openbpf: wwan0: Invalid argument
>
> eek, that's not good.
> Linux is a special snowflake with opening BPF sockets and I don't have a
> VM handy right now. However, this untested patch should hopefully give
> more info as to where the error is.
The patch for ISC dhcp was fixing these filters.
# dhcpcd wwan0
dhcpcd-8.0.2 starting
[ 79.951131] 8021q: 802.1Q VLAN Support v1.8
[ 79.955774] 8021q: adding VLAN 0 to HW filter on device eth0
[ 79.961918] 8021q: adding VLAN 0 to HW filter on device eth1
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
wwan0: waiting for carrier
wwan0: carrier acquired
wwan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
DUID 00:01:00:01:c7:92:bc:92:74:6a:8f:ff:50:55
wwan0: IAID 00:00:00:06
wwan0: delaying IPv6 router solicitation for 0.5 seconds
wwan0: delaying IPv4 for 0.8 seconds
wwan0: soliciting an IPv6 router
wwan0: delaying Router Solicitation for LL address
wwan0: soliciting a DHCP lease
wwan0: sending DISCOVER (xid 0xf35c464), next in 4.6 seconds
OPEN BPF SOCKET
APPLYING FILTER
dhcp_openbpf: wwan0: Invalid argument
wwan0: sending DISCOVER (xid 0xf35c464), next in 8.4 seconds
OPEN BPF SOCKET
APPLYING FILTER
dhcp_openbpf: wwan0: Invalid argument
Archive administrator: postmaster@marples.name