act_nat.c (b409074e6693bcdaa7abbee2a035f22a9eabda53) act_nat.c (4e8ddd7f1758ca4ddd0c1f7cf3e66fce736241d2)
1/*
2 * Stateless NAT actions
3 *
4 * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)

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

61 ret = tcf_idr_create(tn, parm->index, est, a,
62 &act_nat_ops, bind, false);
63 if (ret)
64 return ret;
65 ret = ACT_P_CREATED;
66 } else {
67 if (bind)
68 return 0;
1/*
2 * Stateless NAT actions
3 *
4 * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)

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

61 ret = tcf_idr_create(tn, parm->index, est, a,
62 &act_nat_ops, bind, false);
63 if (ret)
64 return ret;
65 ret = ACT_P_CREATED;
66 } else {
67 if (bind)
68 return 0;
69 tcf_idr_release(*a, bind);
70 if (!ovr)
69 if (!ovr) {
70 tcf_idr_release(*a, bind);
71 return -EEXIST;
71 return -EEXIST;
72 }
72 }
73 p = to_tcf_nat(*a);
74
75 spin_lock_bh(&p->tcf_lock);
76 p->old_addr = parm->old_addr;
77 p->new_addr = parm->new_addr;
78 p->mask = parm->mask;
79 p->flags = parm->flags;

--- 271 unchanged lines hidden ---
73 }
74 p = to_tcf_nat(*a);
75
76 spin_lock_bh(&p->tcf_lock);
77 p->old_addr = parm->old_addr;
78 p->new_addr = parm->new_addr;
79 p->mask = parm->mask;
80 p->flags = parm->flags;

--- 271 unchanged lines hidden ---