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.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 99ec116bef14..7e4ec9fc2cef 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -767,13 +767,15 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
767 struct sk_buff *skb; 767 struct sk_buff *skb;
768 struct bootp_pkt *b; 768 struct bootp_pkt *b;
769 struct iphdr *h; 769 struct iphdr *h;
770 int hlen = LL_RESERVED_SPACE(dev);
771 int tlen = dev->needed_tailroom;
770 772
771 /* Allocate packet */ 773 /* Allocate packet */
772 skb = alloc_skb(sizeof(struct bootp_pkt) + LL_ALLOCATED_SPACE(dev) + 15, 774 skb = alloc_skb(sizeof(struct bootp_pkt) + hlen + tlen + 15,
773 GFP_KERNEL); 775 GFP_KERNEL);
774 if (!skb) 776 if (!skb)
775 return; 777 return;
776 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 778 skb_reserve(skb, hlen);
777 b = (struct bootp_pkt *) skb_put(skb, sizeof(struct bootp_pkt)); 779 b = (struct bootp_pkt *) skb_put(skb, sizeof(struct bootp_pkt));
778 memset(b, 0, sizeof(struct bootp_pkt)); 780 memset(b, 0, sizeof(struct bootp_pkt));
779 781
@@ -826,8 +828,13 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
826 skb->dev = dev; 828 skb->dev = dev;
827 skb->protocol = htons(ETH_P_IP); 829 skb->protocol = htons(ETH_P_IP);
828 if (dev_hard_header(skb, dev, ntohs(skb->protocol), 830 if (dev_hard_header(skb, dev, ntohs(skb->protocol),
829 dev->broadcast, dev->dev_addr, skb->len) < 0 || 831 dev->broadcast, dev->dev_addr, skb->len) < 0) {
830 dev_queue_xmit(skb) < 0) 832 kfree_skb(skb);
833 printk("E");
834 return;
835 }
836
837 if (dev_queue_xmit(skb) < 0)
831 printk("E"); 838 printk("E");
832} 839}
833 840