X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fnet%2Finet_timewait_sock.h;h=95c660c9719ba957c3a57f9957e75528d98083ae;hb=53083773dcbd3c80477e2ace143e361e1e806745;hp=296547bfb0b726610141c511504d358e518e4d94;hpb=f5bb3a5e9dcdb8435471562b6cada89525cf4df1;p=linux-2.6-omap-h63xx.git diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 296547bfb0b..95c660c9719 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -207,4 +207,22 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw, const int timeo, const int timewait_len); extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, struct inet_timewait_death_row *twdr); + +static inline +struct net *twsk_net(const struct inet_timewait_sock *twsk) +{ +#ifdef CONFIG_NET_NS + return twsk->tw_net; +#else + return &init_net; +#endif +} + +static inline +void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net) +{ +#ifdef CONFIG_NET_NS + twsk->tw_net = net; +#endif +} #endif /* _INET_TIMEWAIT_SOCK_ */