There should be a link property on VNICs that allows permitting all DHCP Client Identifiers, since there's no way to reasonably track them, and for people setting up KVM instances, there's no way for them to reasonably know ahead of time what Client Identifier will be used during network setup during installation. This allow-all-dhcp-cids property will allow us to make it so that, unless someone has specified which CIDs are permitted, we can allow all through.
Former user commented on 2018-06-07T20:00:17.270-0400:
To test these changes, I verified that:
Having no "allowed_dhcp_cids" set allows DHCP clients using CIDs to work; the resulting link properties were:
[root@00-0c-29-68-f3-55 ~]# dladm show-linkprop -z 3ef191d9-de9c-6cea-f258-87fc71402823 | grep cid
net0 allowed-dhcp-cids rw -- -- --
net0 allow-all-dhcp-cids rw true false false,true
Setting "allowed_dhcp_cids" to an incorrect CID prevents DHCP from succeeding and a fallback IPv4 linklocal address was set instead; the resulting link properties were:
[root@00-0c-29-68-f3-55 ~]# dladm show-linkprop -z 3ef191d9-de9c-6cea-f258-87fc71402823 | grep cid
net0 allowed-dhcp-cids rw 0xFF1234 -- --
net0 allow-all-dhcp-cids rw false false false,true
Setting "allowed_dhcp_cids" to the correct CID allows DHCP to succeed; the resulting link properties were:
[root@00-0c-29-68-f3-55 ~]# dladm show-linkprop -z 3ef191d9-de9c-6cea-f258-87fc71402823 | grep cid
net0 allowed-dhcp-cids rw 0xFF3E930301000100011E67A7F462483E930301 -- --
net0 allow-all-dhcp-cids rw false false false,true
Ran the dladm(1M) tests:
[root@00-0c-29-68-f3-55 /var/tmp/dladm-tests]# for x in *.ksh; do ksh $x; done
TEST PASS: allowed-cids.ksh
TEST PASS: allowed-ips.ksh
TEST PASS: dynamic-methods.ksh
TEST PASS: show-overlay-exit.kshTEST PASS: vnic-mtu.ksh
Jira Bot commented on 2018-06-08T14:47:50.718-0400:
illumos-joyent commit c6b0ac12851403af18c06800770e65c0314956fb (branch master, by Cody Peter Mello)
OS-5195#icft=OS-5195 DHCP spoofing protection should allow permitting all Client Identifiers
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>