From: Michael Tokarev Date: Wed, 20 May 2009 14:40:04 +0000 (+0400) Subject: TunnelServer: Don't disconnect client on DEL_SUBNET too X-Git-Tag: release-1.0.10~71 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=3759aa5f7745709c43f81faa36510ff650b4bf99;hp=3759aa5f7745709c43f81faa36510ff650b4bf99;p=tinc TunnelServer: Don't disconnect client on DEL_SUBNET too Similar changes as was in 2327d3f6eb5982bcc922ff1ab1ec436ba6aeffdc but for del_subnet_h(). Before, we vere returning false (and causing disconnect of the client) in case of tunnelserver and the client sending DEL_SUBNET for non-his subnet or for subnet which owner isn't in our connection list. After the mentioned change to add_subnet_h() that routine does not add such indirect owners to the connection list anymore, so that was ok (owner == NULL and we return true). But if we too has a connection with the node about which the client is sending DEL_SUBNET notification, say, because that client lost connection with that other node, we'll disconnect this client from us too, returning false for indirect DEL_SUBNET. Fix that by allowing and ignoring indirect DEL_SUBNET in tunnelserver mode. Also rearranged the function a bit, to match add_subnet_h() (in particular, syntax-check everything first, see if we've seen this request before). And also fix some comments. ---