Deleted Added
full compact
in_gif.c (105340) in_gif.c (109623)
1/* $FreeBSD: head/sys/netinet/in_gif.c 105340 2002-10-17 17:47:55Z ume $ */
1/* $FreeBSD: head/sys/netinet/in_gif.c 109623 2003-01-21 08:56:16Z alfred $ */
2/* $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

162 iphdr.ip_ttl = ip_gif_ttl;
163 iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip);
164 if (ifp->if_flags & IFF_LINK1)
165 ip_ecn_ingress(ECN_ALLOWED, &iphdr.ip_tos, &tos);
166 else
167 ip_ecn_ingress(ECN_NOCARE, &iphdr.ip_tos, &tos);
168
169 /* prepend new IP header */
2/* $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

162 iphdr.ip_ttl = ip_gif_ttl;
163 iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip);
164 if (ifp->if_flags & IFF_LINK1)
165 ip_ecn_ingress(ECN_ALLOWED, &iphdr.ip_tos, &tos);
166 else
167 ip_ecn_ingress(ECN_NOCARE, &iphdr.ip_tos, &tos);
168
169 /* prepend new IP header */
170 M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
170 M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
171 if (m && m->m_len < sizeof(struct ip))
172 m = m_pullup(m, sizeof(struct ip));
173 if (m == NULL) {
174 printf("ENOBUFS in in_gif_output %d\n", __LINE__);
175 return ENOBUFS;
176 }
177 bcopy(&iphdr, mtod(m, struct ip *), sizeof(struct ip));
178

--- 221 unchanged lines hidden ---
171 if (m && m->m_len < sizeof(struct ip))
172 m = m_pullup(m, sizeof(struct ip));
173 if (m == NULL) {
174 printf("ENOBUFS in in_gif_output %d\n", __LINE__);
175 return ENOBUFS;
176 }
177 bcopy(&iphdr, mtod(m, struct ip *), sizeof(struct ip));
178

--- 221 unchanged lines hidden ---