Merge pull request #14390 from donaldsharp/fuzz_ospf_fix

FUZZER: Certain types of fuzzing requires a default ospf instance
This commit is contained in:
Donald Sharp 2023-09-11 12:43:44 -04:00 committed by GitHub
commit 9b52e04d95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -173,11 +173,12 @@ static struct ospf *FuzzingCreateOspf(void)
{
struct prefix p;
struct interface *ifp = if_get_by_name("fuzziface", 0, "default");
struct vrf *vrf = vrf_get(VRF_DEFAULT, VRF_DEFAULT_NAME);
ifp->mtu = 68;
str2prefix("11.0.2.0/24", &p);
bool created;
struct ospf *o = ospf_get(0, "omgwtfbbq", &created);
struct ospf *o = ospf_get(0, VRF_DEFAULT_NAME, &created);
o->fd = 69;
struct in_addr in;
@ -354,4 +355,4 @@ done:
/* Not reached. */
return 0;
}
#endif
#endif