Skip to content

Commit

Permalink
pinctrl: Fix possible use of uninitialized eth address.
Browse files Browse the repository at this point in the history
Not sure if this could happen in a real usecase, but below loop
over mac addresses could never reach initialization of 'ea'.

In this case it will be used uninitialized by the later code.
Setting it to zero ethernet address to avoid that condition.

Fixes: e3a398e ("controller: Add ipv6 prefix delegation state machine")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
igsilya authored and putnopvut committed May 14, 2020
1 parent 0502c88 commit d2a3f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ prepare_ipv6_prefixd(struct ovsdb_idl_txn *ovnsb_idl_txn,
}

struct in6_addr ip6_addr;
struct eth_addr ea;
struct eth_addr ea = eth_addr_zero;
for (j = 0; j < pb->n_mac; j++) {
struct lport_addresses laddrs;

Expand Down

0 comments on commit d2a3f9a

Please sign in to comment.