Don't ignore the magic field when searching for the exp1 extension
field in a received response. If there were two exp1 fields in the
packet, and only one of them had the expected magic value, it should
pick the right one.
Fixes: 2319f72b29a9 ("ntp: add client support for experimental extension field")
switch (ef_type) {
case NTP_EF_EXP1:
- if (inst->ext_field_flags & NTP_EF_FLAG_EXP1 && ef_body_length == sizeof (*ef_exp1))
+ if (inst->ext_field_flags & NTP_EF_FLAG_EXP1 &&
+ ef_body_length == sizeof (*ef_exp1) &&
+ ntohl(((NTP_ExtFieldExp1 *)ef_body)->magic) == NTP_EF_EXP1_MAGIC)
ef_exp1 = ef_body;
break;
}