Merge branch 'gcc-10' into main
This commit is contained in:
commit
2e80ae89ca
|
|
@ -2744,7 +2744,7 @@ static int cmd_dev_param_set(struct dl *dl)
|
||||||
struct param_ctx ctx = {};
|
struct param_ctx ctx = {};
|
||||||
struct nlmsghdr *nlh;
|
struct nlmsghdr *nlh;
|
||||||
bool conv_exists;
|
bool conv_exists;
|
||||||
uint32_t val_u32;
|
uint32_t val_u32 = 0;
|
||||||
uint16_t val_u16;
|
uint16_t val_u16;
|
||||||
uint8_t val_u8;
|
uint8_t val_u8;
|
||||||
bool val_bool;
|
bool val_bool;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ static void explain(void)
|
||||||
|
|
||||||
void br_dump_bridge_id(const struct ifla_bridge_id *id, char *buf, size_t len)
|
void br_dump_bridge_id(const struct ifla_bridge_id *id, char *buf, size_t len)
|
||||||
{
|
{
|
||||||
char eaddr[32];
|
char eaddr[18];
|
||||||
|
|
||||||
ether_ntoa_r((const struct ether_addr *)id->addr, eaddr);
|
ether_ntoa_r((const struct ether_addr *)id->addr, eaddr);
|
||||||
snprintf(buf, len, "%.2x%.2x.%s", id->prio[0], id->prio[1], eaddr);
|
snprintf(buf, len, "%.2x%.2x.%s", id->prio[0], id->prio[1], eaddr);
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ static void load_raw_table(FILE *fp)
|
||||||
buf[strlen(buf)-1] = 0;
|
buf[strlen(buf)-1] = 0;
|
||||||
if (info_source[0] && strcmp(info_source, buf+1))
|
if (info_source[0] && strcmp(info_source, buf+1))
|
||||||
source_mismatch = 1;
|
source_mismatch = 1;
|
||||||
strncpy(info_source, buf+1, sizeof(info_source)-1);
|
strlcpy(info_source, buf+1, sizeof(info_source));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((n = malloc(sizeof(*n))) == NULL)
|
if ((n = malloc(sizeof(*n))) == NULL)
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,7 @@ static void load_good_table(FILE *fp)
|
||||||
buf[strlen(buf)-1] = 0;
|
buf[strlen(buf)-1] = 0;
|
||||||
if (info_source[0] && strcmp(info_source, buf+1))
|
if (info_source[0] && strcmp(info_source, buf+1))
|
||||||
source_mismatch = 1;
|
source_mismatch = 1;
|
||||||
info_source[0] = 0;
|
strlcpy(info_source, buf + 1, sizeof(info_source));
|
||||||
strncat(info_source, buf+1, sizeof(info_source)-1);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* idbuf is as big as buf, so this is safe */
|
/* idbuf is as big as buf, so this is safe */
|
||||||
|
|
|
||||||
|
|
@ -1110,7 +1110,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
|
||||||
}
|
}
|
||||||
NEXT_ARG();
|
NEXT_ARG();
|
||||||
}
|
}
|
||||||
hash = sel2.sel.keys[0].val & sel2.sel.keys[0].mask;
|
hash = sel2.keys[0].val & sel2.keys[0].mask;
|
||||||
hash ^= hash >> 16;
|
hash ^= hash >> 16;
|
||||||
hash ^= hash >> 8;
|
hash ^= hash >> 8;
|
||||||
htid = ((hash % divisor) << 12) | (htid & 0xFFF00000);
|
htid = ((hash % divisor) << 12) | (htid & 0xFFF00000);
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ parse_ip6(int *argc_p, char ***argv_p,
|
||||||
/* Shift the field by 4 bits on success. */
|
/* Shift the field by 4 bits on success. */
|
||||||
if (!res) {
|
if (!res) {
|
||||||
int nkeys = sel->sel.nkeys;
|
int nkeys = sel->sel.nkeys;
|
||||||
struct tc_pedit_key *key = &sel->sel.keys[nkeys - 1];
|
struct tc_pedit_key *key = &sel->keys[nkeys - 1];
|
||||||
|
|
||||||
key->mask = htonl(ntohl(key->mask) << 4 | 0xf);
|
key->mask = htonl(ntohl(key->mask) << 4 | 0xf);
|
||||||
key->val = htonl(ntohl(key->val) << 4);
|
key->val = htonl(ntohl(key->val) << 4);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue