<div dir="ltr">Hi Thomas and other DHCP ISC developers,<div><br></div><div>Good day! This is my very first attempt to contribute back to the DHCP ISC community. How could I generate and send pull requests for the git@gitlab.isc.org:isc-projects/dhcp.git repo properly?<br><br>Anyway, currently I attached my patchset to the following issue:<br><br><a href="https://gitlab.isc.org/isc-projects/dhcp/-/issues/152">https://gitlab.isc.org/isc-projects/dhcp/-/issues/152</a><br><br>Looking forward to hearing from you, much appreciated!<br><br>Harry</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 5, 2020 at 12:09 PM Qingtao <<a href="mailto:qingtao.cao.au@gmail.com">qingtao.cao.au@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am trying to use the dhcrelay on an ipsec0 interface that was built upon a<br>
cellular modem interface, wwan0 for example. The problem I am running into<br>
is that, the QMI qmi_wwan.c kernel driver for the cellular modem works in<br>
the raw_ip mode and will setup wwanX relevant net_device with type ==<br>
ARPHRD_NONE and hard_header_len == 0, since the MAC address for wwan0 only<br>
makes sense for the host and not used on the USB link from the host to the<br>
cellular modem.<br>
<br>
Then the ipsec0 interface will inherit both the IP address and the MAC<br>
address, which will upset the dhcp relay daemon: in lpf.c get_hw_addr(), the<br>
switch(sa->sa_family) case structure will thow out the following error:<br>
<br>
Unsupported device type 65534 for "ipsec0"<br>
<br>
The 65534 == 0xFFFE, or ARPHRD_NONE. I am wondering if it is feasible to<br>
change the get_hw_addr() to regard it as an normal case, for example:<br>
<br>
+@@ -522,6 +522,11 @@ get_hw_addr(const char *name, struct har<br>
+ hw->hbuf[0] = HTYPE_FDDI;<br>
+ memcpy(&hw->hbuf[1], sa->sa_data, 6);<br>
+ break;<br>
++ case ARPHRD_NONE:<br>
++ /* When the qmi_wwan.c kernel driver works in the<br>
++ * raw_ip mode the length of MAC address is zero */<br>
++ memset(hw, 0, sizeof(struct hardware));<br>
++ break;<br>
+ default:<br>
+ log_fatal("Unsupported device type %ld for \"%s\"",<br>
+ (long int)sa->sa_family, name);<br>
<br>
Would this work?<br>
<br>
Thanks in advance!<br>
<br>
Harry<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://isc-dhcp-users.2343191.n4.nabble.com/" rel="noreferrer" target="_blank">http://isc-dhcp-users.2343191.n4.nabble.com/</a><br>
_______________________________________________<br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div>