Skip to content

Commit

Permalink
firmware: Use larger ARP cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Sep 19, 2018
1 parent c83e22c commit fb1dfcf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions artiq/firmware/runtime/lib.rs
Expand Up @@ -116,9 +116,8 @@ fn startup() {
smoltcp::phy::EthernetTracer::new(net_device, net_trace_fn)
};

let mut neighbor_cache_storage = [None; 8];
let neighbor_cache =
smoltcp::iface::NeighborCache::new(&mut neighbor_cache_storage[..]);
smoltcp::iface::NeighborCache::new(alloc::btree_map::BTreeMap::new());
let mut interface =
smoltcp::iface::EthernetInterfaceBuilder::new(net_device)
.neighbor_cache(neighbor_cache)
Expand Down

3 comments on commit fb1dfcf

@whitequark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually work because the cache is never cleared. In case there's ARP spam (like from those security tools at NIST), the core device will just crash.

@sbourdeauducq
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You said it was OK for release-3. Can you fix it?

@whitequark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that I will port it to release-3. I'm doing it right now.

Please sign in to comment.