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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 20 Apr 2019 19:33:37 -0600
From:   David Ahern <dsahern@...il.com>
To:     Kristian Evensen <kristian.evensen@...il.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2] ip fou: Support binding FOU ports

On 4/18/19 6:19 AM, Kristian Evensen wrote:
> @@ -77,6 +84,38 @@ static int fou_parse_opt(int argc, char **argv, struct nlmsghdr *n,
>  			gue_set = true;
>  		} else if (!matches(*argv, "-6")) {
>  			family = AF_INET6;
> +		} else if (!matches(*argv, "local")) {
> +			NEXT_ARG();
> +
> +			local = *argv;
> +		} else if (!matches(*argv, "peer")) {
> +			NEXT_ARG();
> +
> +			peer = *argv;
> +		} else if (!matches(*argv, "peer_port")) {
> +			NEXT_ARG();
> +
> +			if (get_be16(&peer_port, *argv, 0) || peer_port == 0)
> +				invarg("invalid peer port", *argv);
> +		} else if (!matches(*argv, "dev")) {
> +			const char *ifname;
> +
> +			NEXT_ARG();
> +
> +			ifname = *argv;
> +
> +			if (check_ifname(ifname)) {
> +				fprintf(stderr, "fou: invalid device name\n");
> +				exit(EXIT_FAILURE);
> +			}
> +
> +			ll_init_map(&rth);

Missed this in v1: you definitely do not want to call ll_init_map here.
It does a full kink dump which can be expensive on large scale setups.
ll_name_to_index alone should be fine.

> +			index = ll_name_to_index(ifname);
> +
> +			if (!index) {
> +				fprintf(stderr, "fou: unknown device name\n");
> +				exit(EXIT_FAILURE);
> +			}
>  		} else {
>  			fprintf(stderr
>  				, "fou: unknown command \"%s\"?\n", *argv);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ