There are two parts.
First of all, sync your master in your local repo to master branch of the upstream repo:
git checkout master
git pull upstream master
git push
Then, you merge master in your feature branch:
git checkout featurebranch1
git merge master
git push