nat_cmd.c (58037) | nat_cmd.c (58042) |
---|---|
1/*- 2 * The code in this file was written by Eivind Eklund <perhaps@yes.no>, 3 * who places it in the public domain without restriction. 4 * | 1/*- 2 * The code in this file was written by Eivind Eklund <perhaps@yes.no>, 3 * who places it in the public domain without restriction. 4 * |
5 * $FreeBSD: head/usr.sbin/ppp/nat_cmd.c 58037 2000-03-14 01:47:02Z brian $ | 5 * $FreeBSD: head/usr.sbin/ppp/nat_cmd.c 58042 2000-03-14 01:47:19Z brian $ |
6 */ 7 8#include <sys/param.h> 9#include <netinet/in.h> 10#include <arpa/inet.h> 11#include <netdb.h> 12#include <netinet/in_systm.h> 13#include <netinet/in.h> --- 364 unchanged lines hidden (view full) --- 378 return bp; 379 380 /* Ensure there's a bit of extra buffer for the NAT code... */ 381 bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF)); 382 ret = PacketAliasIn(MBUF_CTOP(bp), bp->m_len); 383 384 bp->m_len = ntohs(pip->ip_len); 385 if (bp->m_len > MAX_MRU) { | 6 */ 7 8#include <sys/param.h> 9#include <netinet/in.h> 10#include <arpa/inet.h> 11#include <netdb.h> 12#include <netinet/in_systm.h> 13#include <netinet/in.h> --- 364 unchanged lines hidden (view full) --- 378 return bp; 379 380 /* Ensure there's a bit of extra buffer for the NAT code... */ 381 bp = m_pullup(m_append(bp, NULL, NAT_EXTRABUF)); 382 ret = PacketAliasIn(MBUF_CTOP(bp), bp->m_len); 383 384 bp->m_len = ntohs(pip->ip_len); 385 if (bp->m_len > MAX_MRU) { |
386 log_Printf(LogWARN, "nat_LayerPull: Problem with IP header length (%d)\n", 387 bp->m_len); | 386 log_Printf(LogWARN, "nat_LayerPull: Problem with IP header length (%lu)\n", 387 (unsigned long)bp->m_len); |
388 m_freem(bp); 389 return NULL; 390 } 391 392 switch (ret) { 393 case PKT_ALIAS_OK: 394 break; 395 --- 31 unchanged lines hidden --- | 388 m_freem(bp); 389 return NULL; 390 } 391 392 switch (ret) { 393 case PKT_ALIAS_OK: 394 break; 395 --- 31 unchanged lines hidden --- |