Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103535
b: refs/heads/master
c: 0388b00
h: refs/heads/master
i:
  103533: 2f67732
  103531: 8341587
  103527: b1b6ff5
  103519: d32b69c
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jul 15, 2008
1 parent f04f68d commit 6304f31
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61362766d769c934a9d12d5516323c544c161908
refs/heads/master: 0388b0042624714e6f8db8cc7994101a0a02d392
3 changes: 2 additions & 1 deletion trunk/include/net/icmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ DECLARE_SNMP_STAT(struct icmpmsg_mib, icmpmsg_statistics);
struct dst_entry;
struct net_proto_family;
struct sk_buff;
struct net;

extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
extern int icmp_rcv(struct sk_buff *skb);
extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern int icmp_init(void);
extern void icmp_out_count(unsigned char type);
extern void icmp_out_count(struct net *net, unsigned char type);

/* Move into dst.h ? */
extern int xrlim_allow(struct dst_entry *dst, int timeout);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static inline int icmpv4_xrlim_allow(struct net *net, struct rtable *rt,
/*
* Maintain the counters used in the SNMP statistics for outgoing ICMP
*/
void icmp_out_count(unsigned char type)
void icmp_out_count(struct net *net, unsigned char type)
{
ICMPMSGOUT_INC_STATS(type);
ICMP_INC_STATS(ICMP_MIB_OUTMSGS);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,7 @@ int ip_push_pending_frames(struct sock *sk)
struct sk_buff *skb, *tmp_skb;
struct sk_buff **tail_skb;
struct inet_sock *inet = inet_sk(sk);
struct net *net = sock_net(sk);
struct ip_options *opt = NULL;
struct rtable *rt = (struct rtable *)inet->cork.dst;
struct iphdr *iph;
Expand Down Expand Up @@ -1280,7 +1281,7 @@ int ip_push_pending_frames(struct sock *sk)
skb->dst = dst_clone(&rt->u.dst);

if (iph->protocol == IPPROTO_ICMP)
icmp_out_count(((struct icmphdr *)
icmp_out_count(net, ((struct icmphdr *)
skb_transport_header(skb))->type);

/* Netfilter gets whole the not fragmented skb. */
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
unsigned int flags)
{
struct inet_sock *inet = inet_sk(sk);
struct net *net = sock_net(sk);
struct iphdr *iph;
struct sk_buff *skb;
unsigned int iphlen;
Expand Down Expand Up @@ -368,7 +369,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
}
if (iph->protocol == IPPROTO_ICMP)
icmp_out_count(((struct icmphdr *)
icmp_out_count(net, ((struct icmphdr *)
skb_transport_header(skb))->type);

err = NF_HOOK(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
Expand Down

0 comments on commit 6304f31

Please sign in to comment.