aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipconfig.c')
-rw-r--r--net/ipv4/ipconfig.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 92ac7e7363a0..67e8a6b086ea 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -808,8 +808,6 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
808 b->op = BOOTP_REQUEST; 808 b->op = BOOTP_REQUEST;
809 if (dev->type < 256) /* check for false types */ 809 if (dev->type < 256) /* check for false types */
810 b->htype = dev->type; 810 b->htype = dev->type;
811 else if (dev->type == ARPHRD_IEEE802_TR) /* fix for token ring */
812 b->htype = ARPHRD_IEEE802;
813 else if (dev->type == ARPHRD_FDDI) 811 else if (dev->type == ARPHRD_FDDI)
814 b->htype = ARPHRD_ETHER; 812 b->htype = ARPHRD_ETHER;
815 else { 813 else {
@@ -955,8 +953,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
955 953
956 /* Fragments are not supported */ 954 /* Fragments are not supported */
957 if (ip_is_fragment(h)) { 955 if (ip_is_fragment(h)) {
958 if (net_ratelimit()) 956 net_err_ratelimited("DHCP/BOOTP: Ignoring fragmented reply\n");
959 pr_err("DHCP/BOOTP: Ignoring fragmented reply\n");
960 goto drop; 957 goto drop;
961 } 958 }
962 959
@@ -1004,16 +1001,14 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
1004 /* Is it a reply to our BOOTP request? */ 1001 /* Is it a reply to our BOOTP request? */
1005 if (b->op != BOOTP_REPLY || 1002 if (b->op != BOOTP_REPLY ||
1006 b->xid != d->xid) { 1003 b->xid != d->xid) {
1007 if (net_ratelimit()) 1004 net_err_ratelimited("DHCP/BOOTP: Reply not for us, op[%x] xid[%x]\n",
1008 pr_err("DHCP/BOOTP: Reply not for us, op[%x] xid[%x]\n", 1005 b->op, b->xid);
1009 b->op, b->xid);
1010 goto drop_unlock; 1006 goto drop_unlock;
1011 } 1007 }
1012 1008
1013 /* Is it a reply for the device we are configuring? */ 1009 /* Is it a reply for the device we are configuring? */
1014 if (b->xid != ic_dev_xid) { 1010 if (b->xid != ic_dev_xid) {
1015 if (net_ratelimit()) 1011 net_err_ratelimited("DHCP/BOOTP: Ignoring delayed packet\n");
1016 pr_err("DHCP/BOOTP: Ignoring delayed packet\n");
1017 goto drop_unlock; 1012 goto drop_unlock;
1018 } 1013 }
1019 1014
@@ -1198,7 +1193,7 @@ static int __init ic_dynamic(void)
1198 d = ic_first_dev; 1193 d = ic_first_dev;
1199 retries = CONF_SEND_RETRIES; 1194 retries = CONF_SEND_RETRIES;
1200 get_random_bytes(&timeout, sizeof(timeout)); 1195 get_random_bytes(&timeout, sizeof(timeout));
1201 timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned) CONF_TIMEOUT_RANDOM); 1196 timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned int) CONF_TIMEOUT_RANDOM);
1202 for (;;) { 1197 for (;;) {
1203 /* Track the device we are configuring */ 1198 /* Track the device we are configuring */
1204 ic_dev_xid = d->xid; 1199 ic_dev_xid = d->xid;
@@ -1626,11 +1621,13 @@ static int __init ip_auto_config_setup(char *addrs)
1626 1621
1627 return 1; 1622 return 1;
1628} 1623}
1624__setup("ip=", ip_auto_config_setup);
1629 1625
1630static int __init nfsaddrs_config_setup(char *addrs) 1626static int __init nfsaddrs_config_setup(char *addrs)
1631{ 1627{
1632 return ip_auto_config_setup(addrs); 1628 return ip_auto_config_setup(addrs);
1633} 1629}
1630__setup("nfsaddrs=", nfsaddrs_config_setup);
1634 1631
1635static int __init vendor_class_identifier_setup(char *addrs) 1632static int __init vendor_class_identifier_setup(char *addrs)
1636{ 1633{
@@ -1641,7 +1638,4 @@ static int __init vendor_class_identifier_setup(char *addrs)
1641 vendor_class_identifier); 1638 vendor_class_identifier);
1642 return 1; 1639 return 1;
1643} 1640}
1644
1645__setup("ip=", ip_auto_config_setup);
1646__setup("nfsaddrs=", nfsaddrs_config_setup);
1647__setup("dhcpclass=", vendor_class_identifier_setup); 1641__setup("dhcpclass=", vendor_class_identifier_setup);