lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111110192253.GL14734@faui40p.informatik.uni-erlangen.de>
Date:	Thu, 10 Nov 2011 20:22:53 +0100
From:	Toerless Eckert <Toerless.Eckert@...ormatik.Uni-Erlangen.de>
To:	netdev@...r.kernel.org
Cc:	Toerless Eckert <Toerless.Eckert@...ormatik.Uni-Erlangen.de>
Subject: Re: netdev: fwmarks questions

Typo in config below fixed

[ Sorry if this is the wron mailing list. Please let me know if so, and
  recommend a better list for these questions]

a) What APIs exist to set fwmarks for sockets. SO far i could only find:
   setsockopt(,SO_MARK,). But is there for example any system call to
   set the fwmark for all sockets of a process - and which is inherited
   across forks ? If not that, then anything else ?

b) Assume i have two physical ethernet interfaces,
   eth0 ip-address 10.1.1.1/24
   eth1 ip-address 10.10.10.1/24

   I do create a new routing table foobar. I populate it only with routes
   for eth1 (eg: interface route and maybe default route).

   ip route add 10.10.10.0/24 eth1 src 10.10.10.1  table foobar
   ip route add default via 10.10.10.254           table foobar

   I do map this routing table to some fwmark 1234 via eg:

   ip rule add fwmark 1234 table foobar

   Now i have an app with a socket like this:

     s = socket( ...ipv4...)
     setsockopt(s, ... SO_MARK, 1234)
     listen(s, 10)
   
   Question: Would s also accept incoming connections that came in over
   eth0, eg: to eth0, 10.1.1.1 ?

   Logically i think the socket should not accept such connections, but
   only those to eth1, or whatever else i have in my routing table foobar,
   but i have found no documentation that explains how listen() actually
   works when you use fwmarks.

Cheers
    Toerless
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ