X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdhcp-client.c;h=4f90781334f80aeaf22fb51f667e40d97ca3c65c;hb=8fef8c7121222233075a03d57db7e0b48d5f6be5;hp=c8ae00e061eb3499a3be3c8101f768c360c452f7;hpb=6dd3fad481b5d801695c2b0529c7d37cac2c9b19;p=sliver-openvswitch.git diff --git a/lib/dhcp-client.c b/lib/dhcp-client.c index c8ae00e06..4f9078133 100644 --- a/lib/dhcp-client.c +++ b/lib/dhcp-client.c @@ -927,7 +927,7 @@ do_receive_msg(struct dhclient *cli, struct dhcp_msg *msg) flow_extract(&b, 0, &flow); if (flow.dl_type != htons(ETH_TYPE_IP) || flow.nw_proto != IP_TYPE_UDP - || flow.tp_dst != htons(68) + || flow.tp_dst != htons(DHCP_CLIENT_PORT) || !(eth_addr_is_broadcast(flow.dl_dst) || eth_addr_equals(flow.dl_dst, cli_mac))) { continue; @@ -1009,8 +1009,8 @@ do_send_msg(struct dhclient *cli, const struct dhcp_msg *msg) nh.ip_dst = INADDR_BROADCAST; nh.ip_csum = csum(&nh, sizeof nh); - th.udp_src = htons(66); - th.udp_dst = htons(67); + th.udp_src = htons(DHCP_CLIENT_PORT); + th.udp_dst = htons(DHCP_SERVER_PORT); th.udp_len = htons(UDP_HEADER_LEN + b.size); th.udp_csum = 0; udp_csum = csum_add32(0, nh.ip_src);