route.c (930345ea630405aa6e6f42efcb149c3f360a6b67) route.c (67b61f6c130a05b2cd4c3dfded49a751ff42c534)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * ROUTE - implementation of the IP router.
7 *
8 * Authors: Ross Biro

--- 2422 unchanged lines hidden (view full) ---

2431 */
2432 skb_reset_mac_header(skb);
2433 skb_reset_network_header(skb);
2434
2435 /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
2436 ip_hdr(skb)->protocol = IPPROTO_ICMP;
2437 skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr));
2438
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * ROUTE - implementation of the IP router.
7 *
8 * Authors: Ross Biro

--- 2422 unchanged lines hidden (view full) ---

2431 */
2432 skb_reset_mac_header(skb);
2433 skb_reset_network_header(skb);
2434
2435 /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
2436 ip_hdr(skb)->protocol = IPPROTO_ICMP;
2437 skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr));
2438
2439 src = tb[RTA_SRC] ? nla_get_be32(tb[RTA_SRC]) : 0;
2440 dst = tb[RTA_DST] ? nla_get_be32(tb[RTA_DST]) : 0;
2439 src = tb[RTA_SRC] ? nla_get_in_addr(tb[RTA_SRC]) : 0;
2440 dst = tb[RTA_DST] ? nla_get_in_addr(tb[RTA_DST]) : 0;
2441 iif = tb[RTA_IIF] ? nla_get_u32(tb[RTA_IIF]) : 0;
2442 mark = tb[RTA_MARK] ? nla_get_u32(tb[RTA_MARK]) : 0;
2443
2444 memset(&fl4, 0, sizeof(fl4));
2445 fl4.daddr = dst;
2446 fl4.saddr = src;
2447 fl4.flowi4_tos = rtm->rtm_tos;
2448 fl4.flowi4_oif = tb[RTA_OIF] ? nla_get_u32(tb[RTA_OIF]) : 0;

--- 351 unchanged lines hidden ---
2441 iif = tb[RTA_IIF] ? nla_get_u32(tb[RTA_IIF]) : 0;
2442 mark = tb[RTA_MARK] ? nla_get_u32(tb[RTA_MARK]) : 0;
2443
2444 memset(&fl4, 0, sizeof(fl4));
2445 fl4.daddr = dst;
2446 fl4.saddr = src;
2447 fl4.flowi4_tos = rtm->rtm_tos;
2448 fl4.flowi4_oif = tb[RTA_OIF] ? nla_get_u32(tb[RTA_OIF]) : 0;

--- 351 unchanged lines hidden ---