#!/usr/bin/perl # These lines are eval()ed once for each new port. $p is initialized # by rad-bulk-make to be an empty hashref. There is one for each # individual port created. # You should set values here that can be accessed from the template, # in order to create the packets you want. $p->{vlan1} //= int(rand(1024)); $p->{vlan2} //= int(rand(1024)); $p->{nasip} //= "192.168.2." . int(rand(255)); $p->{nasid} //= 'NAS-' . $p->{nasip}; $p->{ifid} //= $p->{nasid} . ' eth 0/2/2:' . $p->{vlan1} . '.' . $p->{vlan2}; $p->{user} //= $p->{ifid} . '@realm';