Discussion:
[Dnsmasq-discuss] [dnsmasq] user-class wrong when multiple data provided
Simon Kelley
2016-02-24 16:34:41 UTC
Permalink
Hi, the list,
I found that when multiple user-class data provided (as rfc3004),
Dnsmasq can not setup DNSMASQ_USER_CLASS<n> correctly.
here is the client machine testing code, using udhcpc in busybox
udhcpc -qf -V zkty-sysinit -i eth2 -x 0x4d:$(echo -ne '\x03123\x04abcd' | hexdump -v -e '1/1 "%02x"')
Wireshark told me that the user-class data is well-formed(See the attatched data log fetched by tcpdump)
my_setenv(env, val, err);
+ my_syslog(MS_DHCP | LOG_INFO, _("!!!!!!!!! env set: %s=%s, err=%d"), env, val, *err);
return next ? next + 1 : NULL;
}
When run dnsmasq with -k -d option, the forground log shows that
dnsmasq-dhcp: !!!!!!!!! env set: DNSMASQ_USER_CLASS0=123, err=0
dnsmasq-dhcp: !!!!!!!!! env set: DNSMASQ_USER_CLASS1=(null), err=0
Yes, it do get 2 user-class data, but the second one is NULL.
So, I think something wrong.
I think you're right, and I think I can see the problem. Are you in a
position to test code from the dnsmasq git repository? I can commit a
fix fairly quickly, but it will take longer to build a test harness
here, and you have one already.
Simon Kelley,
Could you please help me to send this mail to the DNSMASQ list, if my mail
address is not accepted byt the maillist?
I'm in China, where I can not send mail by Gmail, but can receive
it. So I'm using my company's mail. So damned of the GFW...
I copied this reply to that list. That should work.


Cheers,


Simon.

Loading...