> On 24 Feb 2016, at 05:06, Tom Herbert <t...@herbertland.com> wrote:
> 
> On Tue, Feb 23, 2016 at 7:27 AM, Gilberto Bertin
> <gilberto.ber...@gmail.com> wrote:
>> This series introduces support for the SO_BINDTOSUBNET socket option, which
>> allows a listener socket to bind to a subnet instead of * or a single 
>> address.
>> 
>> Motivation:
>> consider a set of servers, each one with thousands and thousands of IP
>> addresses. Since assigning /32 or /128 IP individual addresses would be
>> inefficient, one solution can be assigning subnets using local routes
>> (with 'ip route add local').
>> 
> Hi Gilberto,
> 
> The concept is certainly relevant, but allowing binds by subnet seems
> arbitrary. I can imagine that someone might want to bind to a list of
> addresses, list of interfaces, list of subnets, or complex
> combinations like a subnet on one interface, and list of addresses on
> another. So I wonder if this is another use case for a BPF program on
> a listener socket, like a program for a scoring function. Maybe this
> could even combined with  BPF SO_REUSERPORT somehow?
> 
> Tom

Hi Tom,

thanks for commenting on my patch.
Your proposal is certainly more generic, but at the same time it would require
a bit more work to be used (at least for my specific case).
Indeed in my case it would be only a matter of calling setsockopt() with a
struct that decsribes the subnet, while with BPF it would be necessary to write
and load a scoring function (but at least the subnet descriptor can be stored
in a map, so there's no need to rewrite the filter for each different subnet).
Anyway, I’m curious to explore your idea.

Thanks,
  gilberto

Reply via email to