#!/bin/sh
#
#	$Id: ifup-neigh 8190 2007-01-22 18:46:33Z glen $
#
# Adds static arps for device $DEVICE
# Called from ifup-post.

if is_no "$IPV4_NETWORKING"; then
	return
fi

if [ ! -f /etc/sysconfig/static-arp ]; then
	return
fi

# note the trailing white space character in the grep gets rid of aliases
egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface mac ip state args; do
	[ -z "$state" ] && state="stale"
	/sbin/ip neigh replace $ip lladdr $mac nud $state dev $DEVICE
done

# This must be last line !
# vi:syntax=sh
