Re: [IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

2007-05-15 Thread Julian Anastasov
is to use VIP in ICMP. ip route add local VIP dev lo table user_defined returns RTCF_LOCAL but inet_addr_type() does not return RTN_LOCAL, we fix one thing but break another :) Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev

Re: oops in net/ipv4/icmp.c:icmp_send() with icmp_errors_use_inbound_ifaddr (fwd)

2007-05-17 Thread Julian Anastasov
the routing still has chance to do it (from prefsrc or another interface). Also, any problems if icmp_send happens after SNAT changes source? Or that is not possible? Because we think iph-saddr is sender (target for our ICMP). Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe

Re: [IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

2007-05-18 Thread Julian Anastasov
than using a non-desired source address for ICMP packets. yes, I would prefer the sysctl_ip_nonlocal_bind change to be removed until such solution is found. Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body

Re: [IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

2007-05-30 Thread Julian Anastasov
Hello, On Wed, 30 May 2007, KOVACS Krisztian wrote: I'm just about to publish the next round of tproxy patches (with the routing code modifications completely removed), but this issue is still present. I've posted a few patches making omitting this check possible

Re: [IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

2007-05-31 Thread Julian Anastasov
checks in the fast path. You can post new version if the following change looks good to you and to other developers. If additional sign line is needed here it is: Signed-off-by: Julian Anastasov [EMAIL PROTECTED] @@ -2396,8 +2396,6 @@ static int ip_route_output_slow(struct r

Re: [IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

2007-06-21 Thread Julian Anastasov
tested it :). But i'm not the one that decides, so far we don't see comments from other interested parties, may be there are other opinions? Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED

Re: Debugging neighbour.c: timers

2005-09-07 Thread Julian Anastasov
NUD_IN_TIMER) Must be if (!(n-nud_state NUD_IN_TIMER)) Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Fw: [Bug 5201] New: Badness in dst_release at include/net/dst.h:154

2005-09-08 Thread Julian Anastasov
are going to return next result/error. Signed-off-by: Julian Anastasov [EMAIL PROTECTED] diff -ur v2.6.13/linux/net/ipv4/route.c linux/net/ipv4/route.c --- v2.6.13/linux/net/ipv4/route.c 2005-08-29 07:51:29.0 +0300 +++ linux/net/ipv4/route.c 2005-09-08 09:34:49.864875720 +0300

[PATCH] neigh: always use hash_mask under tbl lock

2006-10-02 Thread Julian Anastasov
Make sure hash_mask is protected with tbl-lock in all cases just like the hash_buckets. Signed-off-by: Julian Anastasov [EMAIL PROTECTED] --- I just noticed this in sources. Let me know if such change is valid and desired for 2.4 or stable tree. Compiles on 2.6.18 and 2.6.18

Re: TCP_DEFER_ACCEPT brokenness?

2007-01-30 Thread Julian Anastasov
the max desired period to wait for data. Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] [IPVS] use msleep_interruptable() instead of ssleep() aka msleep()

2006-11-28 Thread Julian Anastasov
to msleep_interruptable() seems to make the problem go away. Though I'm not sure that it is correct. The same is needed for sync_backup_loop - ssleep(1); + msleep_interruptible(1000); Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line

Re: [patch 2/2] ipvs: Syncrhonise Closing of Connections

2007-11-01 Thread Julian Anastasov
. - atomic_dec(dest-refcnt); + ip_vs_dest_get(dest); if (!cp) { IP_VS_ERR(ip_vs_conn_new failed\n); return; Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list

Re: [PATCH] IPVS: Fix sysctl warnings about missing strategy

2007-11-14 Thread Julian Anastasov
() as proc_handler. There could be side effects if new mode is not applied. Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] IPVS: Fix sysctl warnings about missing strategy

2007-11-15 Thread Julian Anastasov
! I now see that by using CTL_UNNUMBERED for ctl_name stops any writes to 'data', so there is no need for 'strategy' handler. Regards -- Julian Anastasov [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo

[PATCH 2.6.24] fib: fix route replacement, fib_info is shared

2008-01-25 Thread Julian Anastasov
fib_info can be shared by many route prefixes but we don't want duplicate alternative routes for a prefix+tos+priority. Last change was not correct to check fib_treeref because it accounts usage from other prefixes. Signed-off-by: Julian Anastasov [EMAIL PROTECTED] --- --- linux-2.6.24

[PATCH 2.6.24] fib_trie: apply fixes from fib_hash

2008-01-25 Thread Julian Anastasov
is not NULL - copy state from fa to new_fa on replace (not a problem for now) Signed-off-by: Julian Anastasov [EMAIL PROTECTED] --- Not tested, someone please check the findings --- linux-2.6.24/net/ipv4/fib_trie.c_orig 2008-01-25 10:45:06.0 +0200 +++ linux-2.6.24/net/ipv4

Re: [PATCH 2.6.24] fib_trie: apply fixes from fib_hash

2008-01-26 Thread Julian Anastasov
. Regards -- Julian Anastasov [EMAIL PROTECTED] -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared

2008-01-26 Thread Julian Anastasov
, as Joonwoo Park suggests. Signed-off-by: Julian Anastasov [EMAIL PROTECTED] --- --- linux-2.6.24/net/ipv4/fib_hash.c_orig 2008-01-25 10:45:06.0 +0200 +++ linux-2.6.24/net/ipv4/fib_hash.c2008-01-26 14:11:34.0 +0200 @@ -434,19 +434,43 @@ static int fn_hash_insert(struct fib_tab

[PATCHv2 2.6.24] fib_trie: apply fixes from fib_hash

2008-01-26 Thread Julian Anastasov
is not NULL - copy state from fa to new_fa on replace (not a problem for now) - additionally, avoid replacement without error if new route is same, as Joonwoo Park suggests. Signed-off-by: Julian Anastasov [EMAIL PROTECTED] --- --- linux-2.6.24/net/ipv4/fib_trie.c_orig 2008-01-25 10:45:06.0

Re: [Bugme-new] [Bug 9816] New: cannot replace route

2008-01-27 Thread Julian Anastasov
) * alias (tos, type, scope) - fib_info (priority, protocol, prefsrc, metrics) * nexthop (gateway, outdev, scope, weight) read '*' for 'many' and '-' for 'counted reference' Regards -- Julian Anastasov [EMAIL PROTECTED] -- To unsubscribe

Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared

2008-01-28 Thread Julian Anastasov
is not enough to explain everything. May be such and other information can be added as part of some known documentation. Regards -- Julian Anastasov [EMAIL PROTECTED] -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared

2008-02-02 Thread Julian Anastasov
if correct, it could still break some scripts... Agreed, what could break are scripts that add 2 equal alternative routes and checking for errors. BTW, I tried to add more information and that is what I have finally: http://www.ssi.bg/~ja/fib.txt Regards -- Julian Anastasov [EMAIL PROTECTED

Re: [PATCH net-next 2/6] ipv6: Remove external dependency on rt6i_gateway and RTF_ANYCAST

2015-04-29 Thread Julian Anastasov
() where the route is resolved and then attached to skb with skb_dst_set_noref(). Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v2] net: fix a double free issue for neighbour entry

2015-05-20 Thread Julian Anastasov
in neigh_timer_handler should succeed because neigh_flush_dev will change nud_state on success of the 'if (atomic_read(n-refcnt) != 1)' check. - __neigh_event_send: needs check for dead flag, as already discussed Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send

Re: [PATCH net] ip: report the original address of ICMP messages

2015-06-23 Thread Julian Anastasov
was DEST_UNREACH(type=3), HOST_UNREACH(code=1) but simple REJECT rule in OUTPUT can do the same. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH net] ip: report the original address of ICMP messages

2015-06-23 Thread Julian Anastasov
compares random memory. printf(From %s icmp_seq=%u , pr_addr(sin-sin_addr.s_addr), ntohs(icmph.un.echo.sequence)); What you are referring here is the offender address (sin), the sender of the ICMP error, it is just printed... Regards -- Julian Anastasov j...@ssi.bg

Re: [PATCH net-next RFC v2 2/3] ipv4: add support for light weight tunnel encap attributes

2015-06-19 Thread Julian Anastasov
is reused from many fib nodes. There should be check if NH matches by nh_lwtstate. - xfrm4_fill_dst: not sure about this but some fields are copied. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord

Re: [PATCH net-next 00/15] Simplify netfilter and network namespaces

2015-06-18 Thread Julian Anastasov
... Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH net] ip: report the original address of ICMP messages

2015-06-22 Thread Julian Anastasov
: c247f0534cc5 (ip: fix error queue empty skb handling) Signed-off-by: Julian Anastasov j...@ssi.bg --- net/ipv4/ip_sockglue.c | 11 ++- net/ipv6/datagram.c| 12 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c

[PATCH net] net: do not process device backlog during unregistration

2015-06-27 Thread Julian Anastasov
() call. This allows dev-ip_ptr to be always valid during packet processing. Reported-by: Vittorio Gambaletta linuxb...@vittgam.net Fixes: 6e583ce5242f (net: eliminate refcounting in backlog queue) Signed-off-by: Julian Anastasov j...@ssi.bg --- net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH RFC net] neigh: do not modify unlinked entries

2015-06-16 Thread Julian Anastasov
: 6fd6ce2056de (ipv6: Do not depend on rt-n in ip6_finish_output2().) Cc: Eric Dumazet eric.duma...@gmail.com Cc: Ying Xue ying@windriver.com Signed-off-by: Julian Anastasov j...@ssi.bg --- net/core/neighbour.c | 13 + 1 file changed, 13 insertions(+) This is an RFC, so that it can get

Re: [PATCH net-next 00/15] Simplify netfilter and network namespaces

2015-06-17 Thread Julian Anastasov
into struct ip_vs_iphdr, it is filled by ip_vs_fill_iph_skb from small number of places when hook handler is entered. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH net-next 00/15] Simplify netfilter and network namespaces

2015-06-17 Thread Julian Anastasov
Hello, On Wed, 17 Jun 2015, Eric W. Biederman wrote: p.s. I do have my patch that I can toss in your direction if you are interested. Of course... I'll be able to check it after 8 hours... Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-02 Thread Julian Anastasov
think, your patch from January is almost good: http://archive.linuxvirtualserver.org/html/lvs-devel/2015-01/msg00014.html Just add skb-dev check and we should be fine. And the patch from Eric for IPVS looks good too. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-05 Thread Julian Anastasov
|| !ip_vs_addr_equal(cp-af, cp-vaddr, cp-caddr)) ip_vs_drop_early_demux_sk(skb); ret = NF_ACCEPT; } Otherwise, the other changes look good to me. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line

Re: [PATCH net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Julian Anastasov
-vaddr, cp-caddr)) Sigh, it was my mistake, it should be cp-daddr instead of cp-caddr. It seems, I copied it from somewhere to give example... Sorry, can you resend with cp-daddr as v2. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-03 Thread Julian Anastasov
both to local and remote real servers - not likely for forward, nobody forwards traffic destined to local IP to remote host Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-02 Thread Julian Anastasov
Hello, On Thu, 2 Jul 2015, Julian Anastasov wrote: Alex, in our discussion on January I thought we can skip calling skb_orphan for some cases but as input and output path use different skb-destructor we should call skb_orphan for every method, in every case when skb-dev

Re: [PATCH,v2 net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Julian Anastasov
expect sk_fullsock to be true, like ip_local_out). Additionally, skb_set_owner_w is totally broken for non full-socks. Signed-off-by: Alex Gartrell agartr...@fb.com Thanks for fixing this problem! Acked-by: Julian Anastasov j...@ssi.bg May be the patch fixes crashes? If yes

Re: [PATCH net] ipv4: Avoid crashing in ip_error

2015-05-24 Thread Julian Anastasov
-- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net] ipv4: Avoid crashing in ip_error

2015-05-23 Thread Julian Anastasov
are processed, only in_dev-ifa_list can be NULL. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net] ipv4: Avoid crashing in ip_error

2015-05-23 Thread Julian Anastasov
the unregister_netdevice_queue ones. May be it will help for the case when veth_dellink is called with head=NULL. As result, veth_xmit will free all flying skbs to peer that is unregistered first. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev

Re: [PATCH net] net: do not process device backlog during unregistration

2015-06-29 Thread Julian Anastasov
Hello, On Sun, 28 Jun 2015, Eric W. Biederman wrote: Julian Anastasov j...@ssi.bg writes: commit 381c759d9916 (ipv4: Avoid crashing in ip_error) fixes a problem where processed packet comes from device with destroyed inetdev (dev-ip_ptr). This is not expected because

Re: [PATCH net] net: do not process device backlog during unregistration

2015-06-30 Thread Julian Anastasov
Hello, On Mon, 29 Jun 2015, Julian Anastasov wrote: RFC patch: Subject: [PATCHv2 net] net: do not process device backlog during unregistration Ignore this v2, packets in backlog do not hold dev reference, I'll prepare new version with such check in enqueue_to_backlog

Re: [RFC PATCH 1/1] net/ipv4: Enable flow-based ECMP

2015-07-29 Thread Julian Anastasov
alive NH will always use their NH, only hashes that hit dead NH will get new NH. Then change of dead state will not affect the binding of hash to alive nexthop. Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord

[PATCH net 1/2] ipv4: fib_select_default should match the prefix

2015-07-22 Thread Julian Anastasov
fib_trie starting from 4.1 can link fib aliases from different prefixes in same list. Make sure the alternative gateways are in same table and for same prefix (0) by checking tb_id and fa_slen. Fixes: 79e5ad2ceb00 (fib_trie: Remove leaf_info) Signed-off-by: Julian Anastasov j...@ssi.bg --- net

[PATCH net 2/2] ipv4: consider TOS in fib_select_default

2015-07-22 Thread Julian Anastasov
metric 1 Reported-by: Hagen Paul Pfeifer ha...@jauu.net Signed-off-by: Julian Anastasov j...@ssi.bg --- include/net/ip_fib.h | 3 +-- net/ipv4/fib_lookup.h| 1 + net/ipv4/fib_semantics.c | 36 +--- net/ipv4/fib_trie.c | 3 ++- net/ipv4/route.c

Re: [PATCH net-next] ipv6: Avoid rt6_probe() taking writer lock in the fast path

2015-07-21 Thread Julian Anastasov
); + } scripts/checkpatch.pl --strict /tmp/file.patch Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[PATCH net 0/2] ipv4: fib_select_default changes

2015-07-22 Thread Julian Anastasov
report from Hagen Paul Pfeifer. I hope he will see this change. The second change adds fa_default field to the fib aliases (which can be many) and if the feature to filter the alternative routes by TOS is not worth it, this second patch can be scrapped. Julian Anastasov (2): ipv4

[PATCH net-next] ipv4: be more aggressive when probing alternative gateways

2015-07-23 Thread Julian Anastasov
Currently, we do not notice if new alternative gateways are added. We can do it by checking for present neigh entry. Also, gateways that are currently probed (NUD_INCOMPLETE) can be skipped from round-robin probing. Suggested-by: Florian Westphal f...@strlen.de Signed-off-by: Julian Anastasov j

Re: [PATCH net-next 15/22] route: Extend flow representation with tunnel key

2015-07-17 Thread Julian Anastasov
.flowi4_tun_key.tun_id = tun_info-key.tun_id; else fl4.flowi4_tun_key.tun_id = 0; skb_dst_drop(skb); if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr)) -- 2.4.3 Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line

Re: [PATCH v2 -next] net: fib: use fib result when zero-length prefix aliases exist

2015-07-17 Thread Julian Anastasov
(net, res); Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 -next] net: fib: use fib result when zero-length prefix aliases exist

2015-07-19 Thread Julian Anastasov
Hello, On Sat, 18 Jul 2015, Florian Westphal wrote: Julian Anastasov j...@ssi.bg wrote: The only difference I see is that NUD_NODE is declared by fib_nud_is_unreach() as reachable. May be it is better, for example, new route in NUD_NONE state will be tried for a while

Re: [PATCH v2 -next] net: fib: use fib result when zero-length prefix aliases exist

2015-07-20 Thread Julian Anastasov
-- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 -next] net: fib: use fib result when zero-length prefix aliases exist

2015-07-20 Thread Julian Anastasov
Hello, On Mon, 20 Jul 2015, Florian Westphal wrote: Could you please submit your two patches (tos fix and this one) formally? In a day or two, I have to extend the patch and do some tests... Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send

[PATCH net] ipv4: fix problems from the RTNH_F_LINKDOWN introduction

2015-10-24 Thread Julian Anastasov
but LINKDOWN remains set - last address is deleted (LINKDOWN is set), then address is added and device shows carrier OK but LINKDOWN remains set Fixes: 8a3d03166f19 ("net: track link-status of ipv4 nexthops") Signed-off-by: Julian Anastasov <j...@ssi.bg> --- include/net/ip_fib.h

Re: [PATCHv2 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event

2015-10-27 Thread Julian Anastasov
gh */ > case NETDEV_CHANGE: > - fi->fib_flags |= RTNH_F_LINKDOWN; > + if (!netif_carrier_ok(dev)) > + fi->fib_flags |= RTNH_F_LINKDOWN; > break; >

[PATCHv2 net 0/2] ipv4: fix problems from the RTNH_F_LINKDOWN introduction

2015-10-26 Thread Julian Anastasov
add ifconfig dummy0 down in the test case - split to 2 patches Julian Anastasov (2): ipv4: fix to not remove local route on link down ipv4: update RTNH_F_LINKDOWN flag on UP event include/net/ip_fib.h | 2 +- net/ipv4/fib_frontend.c | 13 +++-- net/ipv4/fib_semantics.c |

[PATCHv2 net 1/2] ipv4: fix to not remove local route on link down

2015-10-26 Thread Julian Anastasov
Signed-off-by: Julian Anastasov <j...@ssi.bg> --- include/net/ip_fib.h | 2 +- net/ipv4/fib_frontend.c | 13 +++-- net/ipv4/fib_semantics.c | 11 --- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 727d6e9

[PATCHv2 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event

2015-10-26 Thread Julian Anastasov
my0/ignore_routes_with_linkdown now ip route will show a dead nexthop because the forgotten RTNH_F_LINKDOWN is propagated as RTNH_F_DEAD. Fixes: 8a3d03166f19 ("net: track link-status of ipv4 nexthops") Signed-off-by: Julian Anastasov <j...@ssi.bg> --- net/ipv4/fib_semantics.c

Re: [PATCH net] ipv4: fix problems from the RTNH_F_LINKDOWN introduction

2015-10-26 Thread Julian Anastasov
Hello, On Mon, 26 Oct 2015, Andy Gospodarek wrote: > On Sat, Oct 24, 2015 at 09:20:00PM +0300, Julian Anastasov wrote: > > When fib_netdev_event calls fib_disable_ip on NETDEV_DOWN event > > we should not delete the local routes if the local address > > is still p

Re: [PATCHv2 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event

2015-10-29 Thread Julian Anastasov
sync_up/fib_sync_down_dev in fib_netdev_event if the flag is not set, guarded by CONFIG_IP_ROUTE_MULTIPATH check. To make this work we can also call somehow fib_rebalance() from devinet_conf_proc() context when the flag is changed, all this is for the CONFIG_IP_ROUTE_MULTIPATH cas

Re: [PATCH] inet: delay address promotion check until last request in message

2015-11-09 Thread Julian Anastasov
Hello, On Sun, 8 Nov 2015, Neil Horman wrote: > On Sat, Nov 07, 2015 at 01:49:25AM +0200, Julian Anastasov wrote: > > > > flush can provide many parameters. As there is no > > any kind of indication in the netlink message that all addresses > > ar

Re: [PATCH net] ipvs: use skb_to_full_sk() helper

2015-11-14 Thread Julian Anastasov
883 ("tcp: attach SYNACK messages to request sockets instead > of listener") > Signed-off-by: Eric Dumazet <eduma...@google.com> > Reported-by: Sander Eikelenboom <li...@eikelenboom.it> Looks good, I guess Simon will take the patch for the ipvs tree. Acked

Re: ipv4: ip unreachable with SO_BINDTODEVICE socket

2015-11-11 Thread Julian Anastasov
if we should worry for the unicast traffic. If we want frequent updates only for loopback then the check could be: if (rt_cache_valid(rth) && (!(flags & RTCF_LOCAL) || rth->rt_iif == orig_oif)) { Or the following, it should better cache mcast because mcast does not use/n

[PATCHv3 net 1/2] ipv4: fix to not remove local route on link down

2015-10-30 Thread Julian Anastasov
Signed-off-by: Julian Anastasov <j...@ssi.bg> --- include/net/ip_fib.h | 2 +- net/ipv4/fib_frontend.c | 13 +++-- net/ipv4/fib_semantics.c | 11 --- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 727d6e9

[PATCHv3 net 0/2] ipv4: fix problems from the RTNH_F_LINKDOWN introduction

2015-10-30 Thread Julian Anastasov
ool for force var v1->v2: - forgot to add ifconfig dummy0 down in the test case - split to 2 patches Julian Anastasov (2): ipv4: fix to not remove local route on link down ipv4: update RTNH_F_LINKDOWN flag on UP event include/net/ip_fib.h | 2 +- net/ipv4/fib_frontend.c | 13 +++-

[PATCHv3 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event

2015-10-30 Thread Julian Anastasov
my0/ignore_routes_with_linkdown now ip route will show a dead nexthop because the forgotten RTNH_F_LINKDOWN is propagated as RTNH_F_DEAD. Fixes: 8a3d03166f19 ("net: track link-status of ipv4 nexthops") Signed-off-by: Julian Anastasov <j...@ssi.bg> --- net/ipv4/fib_semantics.c

Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Julian Anastasov
red between all stations. > > Additionally, enabling this option provides compliance with a SHOULD > clause of RFC 1122. > > Signed-off-by: Johannes Berg <johannes.b...@intel.com> Patches 1 and 3 look correct to me, Reviewed-by: Julian Anastasov <j...@ssi.bg

Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-05 Thread Julian Anastasov
Hello, On Wed, 4 Nov 2015, Johannes Berg wrote: > On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote: > >  > > } else if (unlikely(skb->pkt_type != PACKET_HOST)) { > > > > May be such check can save some cycles because > >

Re: [PATCH v3 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-05 Thread Julian Anastasov
red between all stations. > > Additionally, enabling this option provides compliance with a SHOULD > clause of RFC 1122. > > Signed-off-by: Johannes Berg <johannes.b...@intel.com> Patches 1-2 look ok to me, Reviewed-by: Julian Anastasov <j...@ssi.bg> > -

Re: [PATCH] inet: delay address promotion check until last request in message

2015-11-06 Thread Julian Anastasov
assume that one promotion per transaction is enough. The promotion happens in every subnet, it was not once per device. Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org

Re: [PATCH net-next] route: fib_validate_source remove the <= RT_SCOPE_HOST test

2015-10-14 Thread Julian Anastasov
rence. Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out

2015-10-06 Thread Julian Anastasov
t; and dereference net asneeded. > > Signed-off-by: Simon Horman <ho...@verge.net.au> Both patches look good to me Acked-by: Julian Anastasov <j...@ssi.bg> > --- > net/netfilter/ipvs/ip_vs_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >

Re: [PATCH] ipvs: Remove unused net variable from ip_vs_out

2015-10-06 Thread Julian Anastasov
ip_vs_core.c > @@ -1172,7 +1172,6 @@ drop: > static unsigned int > ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff > *skb, int af) > { > - struct net *net = ipvs->net; So, this line should be moved into the block where the var is used? Regards

Re: [PATCH net-next] route: fib_validate_source remove the <= RT_SCOPE_HOST test

2015-10-13 Thread Julian Anastasov
t; 0. Not true, __mkroute_input() uses the 'err' result to set IPSKB_DOREDIRECT. Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCHv3 net 1/2] net: do not process device backlog during unregistration

2015-07-09 Thread Julian Anastasov
: eliminate refcounting in backlog queue) Cc: Eric W. Biederman ebied...@xmission.com Cc: Stephen Hemminger step...@networkplumber.org Signed-off-by: Julian Anastasov j...@ssi.bg --- net/core/dev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core

[PATCHv3 net 0/2] net: fixes for device unregistration

2015-07-09 Thread Julian Anastasov
reference to device but even if they do, subsystems do not expect packets to fly during and after the NETDEV_UNREGISTER event. The first fix has the cost of netif_running check in fast path. The second fix calls rcu_read_lock while local IRQ is disabled, I hope this is not against the rules. Julian

[PATCHv3 net 2/2] net: call rcu_read_lock early in process_backlog

2015-07-09 Thread Julian Anastasov
. Biederman ebied...@xmission.com Cc: Stephen Hemminger step...@networkplumber.org Signed-off-by: Julian Anastasov j...@ssi.bg --- net/core/dev.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 6dd126a..a8e4dd4

Re: [RFC net-next 11/22] dst: Metadata destinations

2015-07-10 Thread Julian Anastasov
if it is missing... if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr)) goto martian_source; Regards -- Julian Anastasov j...@ssi.bg -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH net-next 1/3 v7] net: track link-status of ipv4 nexthops

2015-09-08 Thread Julian Anastasov
ong, both kinds of NETDEV_DOWN events set scope = -1. May be this leads to removal of RT_SCOPE_NOWHERE NHs when "netdev" event NETDEV_DOWN comes. May be we still need a flag to know if the NETDEV_DOWN event was for force=1 and to check it again above? Or may be to use "force

Re: [PATCH] ipvs:Fix locking requirements in the function ip_vs_unlink_service

2015-09-12 Thread Julian Anastasov
se other locking too. ip_vs_wlc.c scheduler is example where sched_lock is not used because only svc->destinations is accessed which is protected with RCU by definition. You can check __ip_vs_unlink_dest() how dest is unlinked with list_del_rcu() before sched->del_dest method is called. R

Re: [PATCH] ipvs:Fix locking requirements in the function ip_vs_unlink_service

2015-09-12 Thread Julian Anastasov
s to svc->sched_data fields. It seems the comment is outdated after commit ceec4c381681 ("ipvs: convert services to rcu"). Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message t

Re: unregister_netdevice warnings when deleting netns

2015-09-29 Thread Julian Anastasov
Hello, On Mon, 28 Sep 2015, Eric W. Biederman wrote: > Julian Anastasov <j...@ssi.bg> writes: > > > On Mon, 28 Sep 2015, Anand Gurram wrote: > > > >> I am currently using kernel version 3.16.7 on a linux switch. > >> While creating and destroyi

Re: [PATCH v2] ipvs: drop first packet to dead server

2015-09-27 Thread Julian Anastasov
if (uses_ct) + return NF_DROP; + cp = NULL; + } } if (unlikely(!cp) && !iph.fragoffs) { Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: unregister_netdevice warnings when deleting netns

2015-09-28 Thread Julian Anastasov
cklog during unregistration") commit 2c17d27c36dc ("net: call rcu_read_lock early in process_backlog") For now I see them only in 3.2.71+ and 3.12.48+. I think, they will appear in other stable versions too... Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from

Re: [PATCH] ipvs: Don't protect ip_vs_addr_is_unicast with CONFIG_SYSCTL

2015-09-28 Thread Julian Anastasov
and any self respecting compiler will > notice that sysctl_cache_bypass is always false without CONFIG_SYSCTL > and not include the logic from the function ip_vs_addr_is_unicast in > the compiled code. > > Signed-off-by: "Eric W. Biederman" <ebied...@xmission.com>

Re: [PATCH next 00/84] ipvs: Stop guessing the network namespace

2015-09-20 Thread Julian Anastasov
ruct netns_ipvs *ipvs = net_ipvs(net); + if (!ipvs) 61/84 ipvs: Pass ipvs into .conn_in_get and ip_vs_conn_in_get_proto "dreive" 62/84 ipvs: Pass ipvs into conn_out_get "dreive" Also, scripts/checkpatch.pl --strict /tmp/*.patch gives me warnings, sometimes for

Re: [PATCH next 00/84] ipvs: Stop guessing the network namespace (take 2)

2015-09-22 Thread Julian Anastasov
aster > > My entire pending set of changes for those who want to look ahead is at: > git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/net-next.git > for-testing > > Eric v2 looks good to me, Acked-by: Julian Anastasov <j...@ssi.bg> Regards -- Julian Anastas

Re: [PATCH] netfilter: ipvs: avoid unused variable warning

2015-11-30 Thread Julian Anastasov
608:14: warning: unused variable 'net' > [-Wunused-variable] > > This removes the line by moving the pointer dereference into the > user of the variable. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> Acked-by: Julian Anastasov <j...@ssi.bg> > diff --git a/net

Re: [PATCH ipvs-next] ipvs: count pre-established TCP states as active

2016-06-06 Thread Julian Anastasov
atomic_inc(>inactconns); > cp->flags |= IP_VS_CONN_F_INACTIVE; > } else if ((cp->flags & IP_VS_CONN_F_INACTIVE) && > - (new_state == IP_VS_TCP_S_ESTABLISHED)) { > +tcp_state_active(new_state)) { > atomic_inc(>activeconns); > atomic_dec(>inactconns); > cp->flags &= ~IP_VS_CONN_F_INACTIVE; > -- > 2.8.3 Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH ipvs-next] ipvs: count pre-established TCP states as active

2016-06-12 Thread Julian Anastasov
nted as "inactive", i.e. cheap ones. The become > "active" quickly but at that time, all of them are already assigned to one > real server (or few), resulting in highly unbalanced distribution. > > Address this by counting the "pre-established" states as &q

Re: [PATCH net] fib_rules: don't break ECN with TOS rules

2016-06-11 Thread Julian Anastasov
dst_len = frh->dst_len; > rule4->dstmask = inet_make_mask(rule4->dst_len); > rule4->tos = frh->tos; > + if (!INET_ECN_ignore(rule4->tos)) > + pr_warn("ipv4: never matching ipv4 rule with match for %x > added\n", > + rule4->tos); You should see this warning for non-tos rules... Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH net] fib_rules: don't break ECN with TOS rules

2016-06-12 Thread Julian Anastasov
Hello, On Sun, 12 Jun 2016, Hannes Frederic Sowa wrote: > On Sun, Jun 12, 2016, at 02:09, Julian Anastasov wrote: > > > > Well, may be the confusion comes from commit 89aef8921bfb > > ("ipv4: Delete routing cache.") where the 'tos &= IP

Re: [PATCH RFC 3/3] ipv4: kill RTO_ONLINK, RT_CONN_FLAGS and RT_CONN_FLAGS_TOS

2016-06-14 Thread Julian Anastasov
oute_output_key_hash(struct net > *net, struct flowi4 *fl4, > if (master_idx) > fl4->flowi4_oif = master_idx; > fl4->flowi4_iif = LOOPBACK_IFINDEX; > - fl4->flowi4_tos = tos & IPTOS_RT_MASK; Now bit 1 reaches rule matching if not masked with IPTOS_RT_MASK. > - fl4->flowi4_scope = ((tos & RTO_ONLINK) ? > - RT_SCOPE_LINK : RT_SCOPE_UNIVERSE); > > rcu_read_lock(); > if (fl4->saddr) { Also, do you plan to include a patch that adds the missing IPTOS_RT_MASK for input route or it is a material for the net tree? Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH RFC 1/3] ipv4: make flow functions more grepable by removing flowi4_init_output

2016-06-14 Thread Julian Anastasov
If they are missed, the lookup will use random value for the new field. I'm not sure what will compile, may be something likes this?: *fl4 = (struct flowi4) { .flowi4_oif = oif, ... }; Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH RFC 2/3] ipv4: make flow functions more grepable by removing flowi4_update_output

2016-06-14 Thread Julian Anastasov
s, > - __be32 daddr, __be32 saddr) > -{ > - fl4->flowi4_oif = oif; > - fl4->flowi4_tos = tos; > - fl4->daddr = daddr; > - fl4->saddr = saddr; > -} My preference is this function to stay, it helps to know the few places that use the route result for new lookup. Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH v2 0/5] ipvs: fix backup sync daemon with IPv6, and minor updates

2016-06-14 Thread Julian Anastasov
nings from checkpatch that can be fixed, you can check them in this way: scripts/checkpatch.pl --strict /tmp/file.patch Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH v2 0/5] ipvs: fix backup sync daemon with IPv6, and minor updates

2016-06-15 Thread Julian Anastasov
t;mcfg.sync_maxlen); <--- 2 TABs ---> But it should be: pr_info("sync thread started: state = MASTER, mcast_ifn = %s, " "syncid = %d, id = %d, maxlen = %d\n", ipvs->mcfg.mcast_ifn, ipvs->mcfg.syncid, tinfo->id, ipvs->mcfg.sync_maxlen); < 1 TAB> Also, the new pr_info calls exceed 80 columns. May be you can reduce the many spaces. Regards -- Julian Anastasov <j...@ssi.bg>

Re: [PATCH v4 net] ipvs: fix bind to link-local mcast IPv6 address in backup

2016-06-17 Thread Julian Anastasov
or the sync daemon") > Signed-off-by: Quentin Armitage <quen...@armitage.org.uk> Looks good to me, thanks! Acked-by: Julian Anastasov <j...@ssi.bg> Simon, please apply to ipvs tree. Patch compiles also on stable 4.4.13, 4.5.7 and 4.6.2, so no need for special

  1   2   3   >