Commit 99f1d3f
committed
sd-dhcp6: fix check if serverid is set
Ever since the initial implementation in 631bbe7,
client_parse_message() was supposed to check that the message contains exactly
one serverid. The check that no more than one is given was implemented
correctly, but the check that at least one is given was not. Simplify the whole
thing by making dhcp6_lease_get_serverid() return an error if the id is not
set, and do not require the arguments to be present if the contents of the id
are not needed.1 parent 21a9905 commit 99f1d3f
2 files changed
+22
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
776 | 774 | | |
777 | 775 | | |
778 | 776 | | |
| |||
817 | 815 | | |
818 | 816 | | |
819 | 817 | | |
820 | | - | |
821 | | - | |
| 818 | + | |
| 819 | + | |
822 | 820 | | |
823 | 821 | | |
824 | 822 | | |
| |||
956 | 954 | | |
957 | 955 | | |
958 | 956 | | |
959 | | - | |
960 | | - | |
| 957 | + | |
| 958 | + | |
961 | 959 | | |
962 | 960 | | |
963 | | - | |
964 | | - | |
| 961 | + | |
| 962 | + | |
965 | 963 | | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
970 | 969 | | |
971 | | - | |
972 | | - | |
973 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | 98 | | |
101 | | - | |
102 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
0 commit comments