From dbbb356d73620f26a2744e9c98bb4ed80d591a21 Mon Sep 17 00:00:00 2001 From: awlane Date: Thu, 11 Jan 2024 19:34:13 -0600 Subject: [PATCH] Fix assumed default NFD socket path and add argument for socket path Note that by default this commit will not work with NFD versions earlier than 4c95771. In cases where this is required, an optional argument is added to the Nfd class to change from the default. Refs #5309 Change-Id: I70a43902dfbaf9a15c074fbac39b15d3db754f1d --- minindn/apps/nfd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/minindn/apps/nfd.py b/minindn/apps/nfd.py index 4b410b9..084dcf4 100644 --- a/minindn/apps/nfd.py +++ b/minindn/apps/nfd.py @@ -28,14 +28,15 @@ class Nfd(Application): def __init__(self, node, logLevel='NONE', csSize=65536, - csPolicy='lru', csUnsolicitedPolicy='drop-all'): + csPolicy='lru', csUnsolicitedPolicy='drop-all', + defaultSocketLocation='/run/nfd'): Application.__init__(self, node) self.logLevel = node.params['params'].get('nfd-log-level', logLevel) self.confFile = '{}/nfd.conf'.format(self.homeDir) self.logFile = 'nfd.log' - self.sockFile = '/run/{}.sock'.format(node.name) + self.sockFile = '{}/{}.sock'.format(defaultSocketLocation, node.name) self.ndnFolder = '{}/.ndn'.format(self.homeDir) self.clientConf = '{}/client.conf'.format(self.ndnFolder)