ip_carp.c (156947) | ip_carp.c (159180) |
---|---|
1/* $FreeBSD: head/sys/netinet/ip_carp.c 156947 2006-03-21 14:29:48Z glebius $ */ | 1/* $FreeBSD: head/sys/netinet/ip_carp.c 159180 2006-06-02 19:59:33Z csjp $ */ |
2 3/* 4 * Copyright (c) 2002 Michael Shalayeff. All rights reserved. 5 * Copyright (c) 2003 Ryan McBride. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 642 unchanged lines hidden (view full) --- 652 m_freem(m); 653 return; 654 } 655 656 getmicrotime(&SC2IFP(sc)->if_lastchange); 657 SC2IFP(sc)->if_ipackets++; 658 SC2IFP(sc)->if_ibytes += m->m_pkthdr.len; 659 | 2 3/* 4 * Copyright (c) 2002 Michael Shalayeff. All rights reserved. 5 * Copyright (c) 2003 Ryan McBride. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 642 unchanged lines hidden (view full) --- 652 m_freem(m); 653 return; 654 } 655 656 getmicrotime(&SC2IFP(sc)->if_lastchange); 657 SC2IFP(sc)->if_ipackets++; 658 SC2IFP(sc)->if_ibytes += m->m_pkthdr.len; 659 |
660 if (SC2IFP(sc)->if_bpf) { | 660 if (bpf_peers_present(SC2IFP(sc)->if_bpf)) { |
661 struct ip *ip = mtod(m, struct ip *); 662 uint32_t af1 = af; 663 664 /* BPF wants net byte order */ 665 ip->ip_len = htons(ip->ip_len + (ip->ip_hl << 2)); 666 ip->ip_off = htons(ip->ip_off); 667 bpf_mtap2(SC2IFP(sc)->if_bpf, &af1, sizeof(af1), m); 668 } --- 1514 unchanged lines hidden --- | 661 struct ip *ip = mtod(m, struct ip *); 662 uint32_t af1 = af; 663 664 /* BPF wants net byte order */ 665 ip->ip_len = htons(ip->ip_len + (ip->ip_hl << 2)); 666 ip->ip_off = htons(ip->ip_off); 667 bpf_mtap2(SC2IFP(sc)->if_bpf, &af1, sizeof(af1), m); 668 } --- 1514 unchanged lines hidden --- |